Last active
March 7, 2016 08:20
-
-
Save tooky/dbd96adaa3188779bdcc to your computer and use it in GitHub Desktop.
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
it('can be returned like a promise', () => { | |
let expectedError = new Error('I am not good.'); | |
let SafePromise = safePromises.failWith(actualError => { | |
expect(actualError).to.equal(expectedError); | |
}); | |
return SafePromise.reject(expectedError) | |
.then(() => { throw new Error('should be caught') }) | |
.catch() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment