'use strict';

const fs = require('fs');

function read(filename) {
  return fs.readFileSync(filename, {'encoding': 'utf8'});
}

exports.revision = {
  'build': (test) => {
    const actual = read('tmp/index.html');
    const expected = read('test/expected/index.html');

    test.equal(actual, expected, 'should revision static files');

    test.done();
  },
};

@@ -33,16 +33,46 @@
 e('fs');
+%0Aconst path = require('path');
 %0A%0Afuncti
@@ -129,29 +129,15 @@
 ame,
- %7B'encoding':
  'utf8'
-%7D
 );%0A%7D
@@ -210,13 +210,43 @@
 ead(
-'tmp/
+path.join(__dirname, '..', 'tmp', '
 inde
@@ -253,16 +253,17 @@
 x.html')
+)
 ;%0A    co
@@ -286,22 +286,38 @@
 ead(
-'test/
+path.join(__dirname, '
 expected
 /ind
@@ -316,9 +316,12 @@
 cted
-/
+', '
 inde
@@ -328,16 +328,17 @@
 x.html')
+)
 ;%0A%0A    t

Refactor test