Skip to content

Commit

Permalink
combine Chai test into a single assertion; increase timeout for repor…
Browse files Browse the repository at this point in the history
…ter tests

Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
  • Loading branch information
boneskull committed Apr 30, 2018
1 parent eb27bf7 commit 85c8f0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ module.exports = {
hiddenFromHelp: true
},
reporters: {
script: test('reporters', '"test/reporters/*.spec.js"'),
script: test('reporters', '--timeout 500 "test/reporters/*.spec.js"'),
description: 'Run Node.js reporter tests',
hiddenFromHelp: true
},
Expand Down
12 changes: 6 additions & 6 deletions test/reporters/base.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ describe('Base reporter', function() {
}
});

it('should interpret chaijs custom error messages', function() {
it('should interpret Chai custom error messages', function() {
var chaiExpect = require('chai').expect;
try {
chaiExpect(43, 'custom error message').to.equal(42);
Expand All @@ -324,11 +324,11 @@ describe('Base reporter', function() {
list([test]);

errOut = stdout.join('\n');
expect(errOut, 'to match', /custom error message\n/);
expect(errOut, 'to match', /\+42/);
expect(errOut, 'to match', /-43/);
expect(errOut, 'to match', /- actual/);
expect(errOut, 'to match', /\+ expected/);
expect(errOut, 'to match', /custom error message\n/)
.and('to match', /\+42/)
.and('to match', /-43/)
.and('to match', /- actual/)
.and('to match', /\+ expected/);
}
});

Expand Down

0 comments on commit 85c8f0d

Please sign in to comment.