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.

Defining test timeout as a config parameter

See original GitHub issue

🚀 Feature Proposal

I’d like to propose introducing a new config parameter config called timeout, that would accept a number or a string.

Motivation

To set a global timeout different than Jest’s default, one must use a setupTestFrameworkScriptFile config and create a new file. This is a bit cumbersome, isn’t it?

It would also play nice with the API we have for already: jest.setTimeout(number).

Example

"jest": {
  "timeout": 60000
}

Pitch

Why does this feature belong in the Jest core platform?

It is a config change, duh.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:93
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

35reactions
SimenBcommented, Jun 7, 2018

Having a flag like ‘disable timeouts’ on the cli to help debugging makes more sense to me than being able to set a timeout

21reactions
felixfbeckercommented, Feb 17, 2019

I can’t believe this doesn’t exist? How is it even possible to use a step debugger if every test times out after 5s?

Read more comments on GitHub >

github_iconTop Results From Across the Web

TestNG Test Timeouts - HowToDoInJava
To specify timeout duration, use timeOut attribute of @Test annotation. The timeout value is in milliseconds. Timeout Configuration Syntax. @ ...
Read more >
Default Test Timeout - NCrunch Documentation
Timeouts are specified in milliseconds (ms) and will be applied to all tests declared within the applicable project. Where this setting is 0,...
Read more >
Timeout Periods for Test Controllers and Test Agents - Visual ...
Learn how to change the timeout values for the test controller and the test agent by editing the associated XML configuration files.
Read more >
Timeouts - Parasoft C++test 10.3.2 (Visual Studio)
If the behavior is correct and the tested code is just slow, change the timeout setting to a larger value in the Test...
Read more >
Timeout - NUnit Docs
The specified timeout value covers the test setup and teardown as well as the test method itself. Before and after actions may also...
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