-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
it() done documentation? #1801
Comments
Note jest uses jasmine and the jasmine docs say this: https://jasmine.github.io/2.5/introduction.html#section-58 |
Yeah, for now we rely on the Jasmine docs for this. We'll document it at some point when we have something new. If you'd like to document the |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi!
Today I was in a dire need of a
fail()
function to fail my tests and after looking through documentation and examples, I remembered there was thisit('', (done) => {...})
thing, in a time where Promises were not yet popular :-)I realized that
done
is not only a function, but also has adone.fail()
, which is super valuable for cases likeFor async function flows or chained promises with a
catch
, I didn't find a clean way to prevent undetected errors for erroneous testing code (if I hadn't had thedone.fail()
in the example above, a test would run through green, iffnWhichShouldFail()
was mocked wrongly and doesn't throw.So my question is: Is there any reason why there is no documentation about that? Or do you have plans for a better API replacement?
The text was updated successfully, but these errors were encountered: