-
Notifications
You must be signed in to change notification settings - Fork 776
Closed
Labels
Component: CoreFor module, test, hooks, and reporters.For module, test, hooks, and reporters.
Milestone
Description
Tip
Migration guide has been published at: https://qunitjs.com/api/config/testTimeout/
Rationale
- Give better feedback by default in the common case of an async test failing or getting stuck. This applies to both the HTML Reporter and QUnit CLI on Node.js (Common case, because inevitably something somewhere might have relied on taking longer than the default timeout we'll come up with, e.g. minutes or hours).
- Avoid silent failure when using QUnit via
require('qunit')without the QUnit CLI, ref Async tests can abruptly stop in standalone Node.js mode #1132. Right now, due to there not being a default timeout, there appears to be nothing preventing Node.js from silently existing the process after a stuck async test.
Research
- Jasmine: 5 seconds, ref https://github.com/jasmine/jasmine/blob/v3.6.0/lib/jasmine-core/jasmine.js#L196-L201.
- Mocha: 2 seconds, ref https://mochajs.org/#command-line-usage.
- Tape: No default, I think? ref https://github.com/substack/tape.
- Karma: 30 seconds (inactivity), ref https://karma-runner.github.io/5.2/config/configuration-file.html.
- Jest: 5 seconds, ref https://jestjs.io/docs/en/api.
- Intern: 30 seconds, ref https://theintern.io/docs.html#Intern/4/docs/docs%2Fconfiguration.md/properties.
Subtasks
- Determine the timeout we're going to use.
- Improve documentation of config.testTimeout to include an example of how to set this for integrations like
karma-qunit,node-qunit-puppeteerand the QUnit CLI since for many users this is likely the first time they are needing to set a configuration option rather than simply loading test files into a test runner. - In QUnit 2.x, emit a warning for tests that have no timeout configurred but take longer than our preferred timeout.
- In QUnit 3.0, enable the timeout by default and remove the warning.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Component: CoreFor module, test, hooks, and reporters.For module, test, hooks, and reporters.