import test from 'ava';
import fs from 'fs';

test.before((t) => {
  const { exec } = require('child_process');
  exec('gulp', (err, stdout, stderr) => {
    if (err) {
      console.error('Failed to run gulp', err);
    }
  });
});

test('dark signature output', async (t) => {
  const expected = fs.readFileSync('./tests/sample/dark/signature-dark.html');
  const built = fs.readFileSync('./dist/dark/signature-dark.html');

  t.deepEqual(expected, built);
});

test('dark signature reply output', async (t) => {
  const expected = fs.readFileSync('./tests/sample/dark/signature-reply-dark.html');
  const built = fs.readFileSync('./dist/dark/signature-reply-dark.html');

  t.deepEqual(expected, built);
});

test('light signature output', async (t) => {
  const expected = fs.readFileSync('./tests/sample/light/signature-light.html');
  const built = fs.readFileSync('./dist/light/signature-light.html');

  t.deepEqual(expected, built);
});

test('light signature reply output', async (t) => {
  const expected = fs.readFileSync('./tests/sample/light/signature-reply-light.html');
  const built = fs.readFileSync('./dist/light/signature-reply-light.html');

  t.deepEqual(expected, built);
});

test('light full mail output', async (t) => {
  const expected = fs.readFileSync('./tests/sample/light/full-mail-light.html');
  const built = fs.readFileSync('./dist/light/full-mail-light.html');

  t.deepEqual(expected, built);
});

@@ -1,234 +1,86 @@
-impor
+cons
 t test 
-from 'ava';%0Aimport fs from 'fs';%0A%0Atest.before((t) =%3E %7B%0A  const %7B exec %7D = require('child_process');%0A  exec('gulp', (err, stdout, stderr) =%3E %7B%0A    if (err) %7B%0A      console.error('Failed to run gulp', err);%0A    %7D%0A  %7D);%0A%7D
+= require('ava');%0Aconst fs = require('fs');%0Aconst path = require('path'
 );%0A%0A
@@ -151,35 +151,46 @@
 fs.readFileSync(
-'./
+path.resolve('
 tests/sample/dar
@@ -204,32 +204,33 @@
 ture-dark.html')
+)
 ;%0A  const built 
@@ -239,35 +239,46 @@
 fs.readFileSync(
-'./
+path.resolve('
 dist/dark/signat
@@ -284,32 +284,33 @@
 ture-dark.html')
+)
 ;%0A%0A  t.deepEqual
@@ -411,35 +411,46 @@
 fs.readFileSync(
-'./
+path.resolve('
 tests/sample/dar
@@ -474,24 +474,25 @@
 -dark.html')
+)
 ;%0A  const bu
@@ -509,27 +509,38 @@
 eadFileSync(
-'./
+path.resolve('
 dist/dark/si
@@ -560,24 +560,25 @@
 -dark.html')
+)
 ;%0A%0A  t.deepE
@@ -678,35 +678,46 @@
 fs.readFileSync(
-'./
+path.resolve('
 tests/sample/lig
@@ -733,32 +733,33 @@
 ure-light.html')
+)
 ;%0A  const built 
@@ -768,35 +768,46 @@
 fs.readFileSync(
-'./
+path.resolve('
 dist/light/signa
@@ -815,32 +815,33 @@
 ure-light.html')
+)
 ;%0A%0A  t.deepEqual
@@ -943,35 +943,46 @@
 fs.readFileSync(
-'./
+path.resolve('
 tests/sample/lig
@@ -1004,32 +1004,33 @@
 ply-light.html')
+)
 ;%0A  const built 
@@ -1039,35 +1039,46 @@
 fs.readFileSync(
-'./
+path.resolve('
 dist/light/signa
@@ -1092,32 +1092,33 @@
 ply-light.html')
+)
 ;%0A%0A  t.deepEqual
@@ -1222,19 +1222,30 @@
 ileSync(
-'./
+path.resolve('
 tests/sa
@@ -1277,16 +1277,17 @@
 t.html')
+)
 ;%0A  cons
@@ -1316,11 +1316,22 @@
 ync(
-'./
+path.resolve('
 dist
@@ -1359,16 +1359,17 @@
 t.html')
+)
 ;%0A%0A  t.d

Resolve paths in test