Giter Site home page Giter Site logo

jest giving error Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout. on some tests about api-design-node-v3 HOT 6 CLOSED

frontendmasters avatar frontendmasters commented on August 29, 2024
jest giving error Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout. on some tests

from api-design-node-v3.

Comments (6)

brunogonzales avatar brunogonzales commented on August 29, 2024 1

@alvinlal I found the solution. You can add jest.setTimeout(10000) anywhere to test-db-setup.js to increase the Jest's default timeout.
image

from api-design-node-v3.

brunogonzales avatar brunogonzales commented on August 29, 2024

@alvinlal did you find out what was causing this? I'm getting this same error

from api-design-node-v3.

alvinlal avatar alvinlal commented on August 29, 2024

@brunogonzales the problem was because of the default timeout value of jest which is 5000ms.That is any test that takes more than 5000ms will be failed.You can change the default value to a higher value to solve this problem.But i am not sure how to do that as i have no experience with jest.

from api-design-node-v3.

brunogonzales avatar brunogonzales commented on August 29, 2024

So you never ended up passing the tests?

from api-design-node-v3.

alvinlal avatar alvinlal commented on August 29, 2024

@brunogonzales some test passed and some didn't.I tried to create a jest configuration file and set the default timeout value but that didnt work,let me know if you find any fix,

from api-design-node-v3.

alvinlal avatar alvinlal commented on August 29, 2024

@brunogonzales Thanks so much!

from api-design-node-v3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.