From 6fac6a227ef6166d43d473c776039ef69ba20a78 Mon Sep 17 00:00:00 2001 From: Mu-An Chiou Date: Tue, 2 Jun 2015 15:31:59 +0900 Subject: [PATCH] fix 'test exited without ending' --- test/test.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/test.js b/test/test.js index a6d8d65..cbe6928 100644 --- a/test/test.js +++ b/test/test.js @@ -50,6 +50,8 @@ function startTests (filenames) { test('has the right files', function (t) { t.equal(files.length, 6, 'created 6 files?') + t.ok(files.indexOf('index.html') >= 0, 'index.html exists?') + filenames.forEach(function (name) { fs.readFile(path.resolve(outputPath, name + '.html'), function (err, data) { t.error(err, name + '.html exists?') @@ -57,13 +59,12 @@ function startTests (filenames) { }) }) - t.ok(files.indexOf('index.html') >= 0, 'index.html exists?') - fs.readdir(outputPath + '/assets', function (err, files) { if (err) return console.log(err) t.ok(files.indexOf('main.css') >= 0, 'assets/main.css exists?') - t.end() }) + + t.end() }) })