Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Better error reporting when the test run fails
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed Apr 16, 2016
1 parent 6e27eb8 commit f006e4d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/generators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ describe('generator-feathers', () => {
child.stderr.on('data', data => buffer += data);

child.on('exit', function (status) {
assert.equal(status, 0, 'Got correct exit status');
if(status !== 0) {
return done(new Error(buffer));
}

assert.ok(buffer.indexOf(expectedText) !== -1,
'Ran test with text: ' + expectedText);
done();
Expand Down

0 comments on commit f006e4d

Please sign in to comment.