-
-
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
jest.setTimeout is not a function #3788
Comments
@DmitriiAbramov Can you add "available in Jest 21" like we do in other places? |
Is this really only available starting with v21? How was it possible to wait for long-running async calls to complete instead of the test failing with |
Just do:
It's a compat layer with Jasmine, currently not super documented, here's the mention: http://facebook.github.io/jest/docs/troubleshooting.html#unresolved-promises |
That's weird, I swear I had checked the Troubleshooting page but didn't see that. UPDATE: There's a different doc under http://facebook.github.io/jest/docs/en/troubleshooting.html#unresolved-promises What's the deal with these inconsistent doc pages at almost the same URL? |
@thymikee where exactly should I add
|
@rochapablo for example you can add it to your setup test framework file: http://facebook.github.io/jest/docs/en/configuration.html#setuptestframeworkscriptfile-string |
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. |
I've added
jest.setTimeout(1000);
to the Getting Startedsum.test.js
file, but when I run./node_modules/.bin/jest sum.test.js
I get this error:The documentation claims that
Other calls, e.g.
jest.clearAllTimers()
, do work.The text was updated successfully, but these errors were encountered: