profile
viewpoint

Ask questionsExceeded timeout of 5000 ms for a test

I am upgrading jest from v1.4.3 --> 2+, with chromedriver version 91+. I have started getting this issue:

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

I have been googling a lot but not getting proper solution. So, far I have tried following solutions:- 1)Increased jest.setTimeout(30000) from 30000 to 60000. 2)Tried using jest- testRunner": "jest-circus/runner"

My package.json configuration is as below: "@types/jest": "26.0.23", "@types/node": "15.12.4", "@types/selenium-webdriver": "4.0.14", "chromedriver": "91.0.1", "concurrently": "6.2.0", "jest": "27.0.5", "prettier": "2.3.1", "selenium-webdriver": "4.0.0-alpha.7", "ts-jest": "27.0.3", "tslint": "6.1.3", "tslint-config-prettier": "^1.15.0", "tslint-config-sparta": "0.3.4", "tslint-loader": "3.5.4", "typedoc": "0.21.0", "typescript": "3.9.7", "ui-testing-core": "0.15.12"

Can anybody point out what is the solution?

facebook/jest

Answer questions JonWallsten

// jest.config.js
module.exports = {
    // ...
    testTimeout: 20000
}

It seems to solve the problem.

Have you tested this? We tried it and it didn't work.

useful!
source:https://uonfu.com/
Github User Rank List