Created
April 2, 2018 17:45
-
-
Save patoi/aad4a3cc020613f7ed4ee9ad7e6ae38b 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('is not OK - not bad, but it could be better', async () => { | |
try { | |
let result = await testFunction(false) | |
expect.fail() | |
// flawed test throws an ugly error: | |
} catch (err) { | |
// ...'AssertionError: expected 'expect.fail()' to equal 'not OK'' | |
expect(err.message).to.be.equal('not OK') | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment