Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
fix 'test exited without ending'
Browse files Browse the repository at this point in the history
  • Loading branch information
muan committed Jun 2, 2015
1 parent 75cd426 commit 6fac6a2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test.js
Expand Up @@ -50,20 +50,21 @@ 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?')
t.ok(data.toString().match('<strong>' + name + '</strong>'), name + '.html contains html including the name?')
})
})

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()
})
})

Expand Down

0 comments on commit 6fac6a2

Please sign in to comment.