-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a flag (-R, --rejections) to make the test fail if an unhandled…
… Promise rejection happened during its execution (#658) * Changed the npm scripts so they can be run in Windows (some tests keep failing though) * Removed duplicate object key * Added a flag (-R, --rejections) to make the test fail if an unhandled Promise rejection happened during its execution * Added runner.js test case to cover the -R flag
- Loading branch information
Showing
6 changed files
with
96 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use strict'; | ||
|
||
// Load modules | ||
|
||
const Code = require('code'); | ||
const _Lab = require('../../test_runner'); | ||
|
||
|
||
// Declare internals | ||
|
||
const internals = {}; | ||
|
||
|
||
// Test shortcuts | ||
|
||
const lab = exports.lab = _Lab.script(); | ||
const describe = lab.describe; | ||
const it = lab.it; | ||
const expect = Code.expect; | ||
|
||
|
||
describe('Test Promises', () => { | ||
|
||
it('handles a Promise rejection', ( done ) => { | ||
Promise.reject(new Error('Rejection!')); | ||
done(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters