Skip to content

Commit

Permalink
Promise rejection in test should provide new Error
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescostian committed May 2, 2017
1 parent f092f98 commit b449db2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('using the module with promises', () => {
it('provides an error when the file can\'t be read', () =>
ss(createReadStream('./not-a-file-in-here'))
.then(
() => Promise.reject('uh-oh!'), // If the library resolves this promise, then the library is wrong
() => Promise.reject(new Error('uh-oh!')), // If the library resolves this promise, then the library is wrong
() => expect(true).toBe(true) // If the library rejects this promise, it's all good :)
)
)
Expand Down

0 comments on commit b449db2

Please sign in to comment.