Skip to content

Commit

Permalink
Update hook error tests so error tip & nested error are consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
chinchiheather committed Apr 18, 2018
1 parent 1c45a93 commit 427505b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
'use strict';

describe('spec 1', function () {
it('should pass', function () {
it('should not blame me', function () {
console.log('test 1');
});
describe('nested', function () {
describe('nested 1', function () {
before(function() {
throw new Error('Nested before hook error');
});
it('should fail because of hook error', function () {
it('blames me', function () {
console.log('test 2');
});
});
Expand Down
4 changes: 2 additions & 2 deletions test/integration/hook-err.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('hook error handling', function () {
it('should verify results', function () {
assert.deepEqual(
lines,
['1) spec 2', '"before all" hook:']
['1) spec 2', '"before all" hook for "skipped":']
);
});
});
Expand All @@ -33,7 +33,7 @@ describe('hook error handling', function () {
it('should verify results', function () {
assert.deepEqual(
lines,
['1) spec 1', 'nested', '"before all" hook for "should fail because of hook error":']
['1) spec 1', 'nested 1', '"before all" hook for "blames me":']
);
});
});
Expand Down

0 comments on commit 427505b

Please sign in to comment.