Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting a global timeout in Ember-cli for Qunit

I cannot find anywhere that it is documented for ember-cli to set a global timeout for QUnit.

I have found the documentation for QUnit: https://api.qunitjs.com/QUnit.config/

testTimeout (default: undefined) Type: Number Specify a global timeout in milliseconds after which all tests will fail with an appropriate message. Useful when async tests aren't finishing, to prevent the testrunner getting stuck. Set to something high, e.g. 30000 (30 seconds) to avoid slow tests to time out by accident.

I was able to change this inside of \node_modules\ember-cli-qunit\vendor\ember-cli-qunit\qunit-configuration.js and this works as expected.

However, we do not check in the node_modules to source control, so changing this value here doesn't really do me any good.

I'm at a loss here on where I'm supposed to make a change to get a global test timeout in ember-cli.

like image 831
Michiel Bugher Avatar asked Apr 13 '15 22:04

Michiel Bugher


1 Answers

This can be done within the //tests/test-helper.js file.

QUnit.config.testTimeout = 60000;

like image 169
Michiel Bugher Avatar answered Sep 21 '22 08:09

Michiel Bugher