Skip to content

Commit

Permalink
Merge pull request #149 from arb/notebook-errors
Browse files Browse the repository at this point in the history
Changed session errors to script errors.
  • Loading branch information
geek committed Aug 11, 2014
2 parents 4fc2484 + 85ed4f4 commit 04c0eb2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/reporters/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ internals.Reporter.prototype.end = function (notebook) {

// remove node_modules folders and only show the first 5 lines of the stack
stack = stack.split('\n').filter(function (line) {

return !(/\/node_modules\//.test(line));
}).slice(0,5).join('\n');

output += red(message) + '\n';
output += gray(stack) + '\n\n';
}
output += red('There were ' + errors.length + ' session error(s).') + '\n\n'
output += red('There were ' + errors.length + ' test script error(s).') + '\n\n'
}

if (failures.length) {
Expand Down
4 changes: 2 additions & 2 deletions test/reporters.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ describe('Reporter', function () {
var result = output.replace(/\/[\/\w]+\.js\:\d+\:\d+/g, '<trace>');

expect(code).to.equal(1);
expect(result).to.contain('There were 1 session error(s).');
expect(result).to.contain('There were 1 test script error(s).');
expect(result).to.contain('there was an error in the before function');
done();
});
Expand All @@ -527,7 +527,7 @@ describe('Reporter', function () {
var result = output.replace(/\/[\/\w]+\.js\:\d+\:\d+/g, '<trace>');

expect(code).to.equal(1);
expect(result).to.contain('There were 1 session error(s).');
expect(result).to.contain('There were 1 test script error(s).');
expect(result).to.contain('there was an error in the afterEach function');
done();
});
Expand Down

0 comments on commit 04c0eb2

Please sign in to comment.