Codesandbox-client: Jest: Exceeded timeout of 5000ms for a test

Created on 4 Jul 2018  路  8Comments  路  Source: codesandbox/codesandbox-client

Due that Jest is automatic in Codesandbox. It would be great if you can provide the option to increase the timeout.

https://codesandbox.io/s/github/joseluisq/hyperapp-starter

Exceeded timeout of 5000ms for a test.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test.

Error: Exceeded timeout of 5000ms for a test.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test.
    at https://codesandbox.io/static/js/vendors~sandbox.4581c9c4.chunk.js:1:283345
    at https://codesandbox.io/static/js/vendors~sandbox.4581c9c4.chunk.js:1:283511
stale 馃儚 Jest 馃挰 Discussion

Most helpful comment

Have you tried extending the timeout value using jest.setTimeout(value) inside your test file ?

yes, It doesn't work

All 8 comments

Hey! Few things -

  • I don't know how that example link is related to your problem because there are no test suites.

  • We can set a default timeout value in TestRunner. The default provided in Jest is 5 seconds. We can extend that.

  • Last thing, adding an option for changing timeouts frequently will cause a memory leak

I don't know how that example link is related to your problem because there are no test suites.

I have updated the link:
https://codesandbox.io/s/github/joseluisq/hyperapp-starter

We can set a default timeout value in TestRunner. The default provided in Jest is 5 seconds. We can extend that.

How can we extend that?

Last thing, adding an option for changing timeouts frequently will cause a memory leak

What do you suggest?
Here you have the same app tested using Travis CI:
https://travis-ci.org/joseluisq/hyperapp-starter/jobs/401018541#L457

Give me a little bit of time to search into this and see if I can extend the default timeout value. If I succeed, then I am sure I'll able to resolve memory issue too.

Have you tried extending the timeout value using jest.setTimeout(value) inside your test file ?

Have you tried extending the timeout value using jest.setTimeout(value) inside your test file ?

yes, It doesn't work

my tests are running smoothly when I'm not in headless mode .
as soon as I try with headless i get this error:
Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
increasing and decreasing the slowMo I understood that it needs to be faster then setTimeout .
but I still can't get rid of this error message .

This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.

This issue has been automatically closed because there wasn't any activity after the previous notice or the stale label wasn't removed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

faceyspacey picture faceyspacey  路  3Comments

Haroenv picture Haroenv  路  3Comments

yazaabed picture yazaabed  路  3Comments

CompuIves picture CompuIves  路  3Comments

BingoRUS picture BingoRUS  路  3Comments