question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jest-circus doesn't fail tests on timeouts set by `jest.setTimeout`

See original GitHub issue

🐛 Bug Report

jest-circus happily passes a test which times out.

To Reproduce

See instructions for running circus here: #4362.

Then one can run the following test (which should fail, but it passes): https://github.com/facebook/jest/blob/d4a7fca5a6da9d2545467bff8b6a6043b1c3aa3c/integration-tests/failures/__tests__/async_failures.test.js#L27-L31

Expected behavior

It should fail

Link to repl or repo (highly encouraged)

The Jest repo reproduces.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
joschacommented, Feb 18, 2021

Is there some news on this or is the suggested way of working around this to only ever change the timeout in a describe block but never a test itself?

0reactions
github-actions[bot]commented, Apr 28, 2022

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. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jest setTimeout not pausing test - Stack Overflow
This does not pause the current test function. jest. setTimeout defines maximum amount of time a test function can take for completion. With...
Read more >
Configuring Jest
The fake timers may be useful when a piece of code sets a long timeout that we don't want to wait for in...
Read more >
Introduction to the Jest and Puppeteer Timeouts - Medium
By default, it's set to 5 seconds, if the test run exceeds this time the test will fail with the error like. Timeout...
Read more >
jest-playwright-preset - npm Package Health Analysis - Snyk
playwright actions can take some time for execution, because of it jest-playwright overrides jest default timeout interval from 5 to 15 seconds. You...
Read more >
The Jest Object - Jest 中文文档
The jest object is automatically in scope within every test file. The methods in the jest object help create mocks and let you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found