Setting 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 found the documentation for QUnit: https://api.qunitjs.com/QUnit.config/

testTimeout (default: undefined) Type: Number Specify the global timeout in milliseconds after which all tests will fail with the appropriate message. Useful when asynchronous tests do not end to prevent the tester from getting stuck. Set something high, for example. 30,000 (30 seconds) to avoid slow tests so that happens from time to time.

I managed to change this inside \ node_modules \ ember-cli-qunit \ vendor \ ember-cli-qunit \ qunit-configuration.js and it works as expected.

However, we do not check the node_modules for the original control, so changing this value here really does not do me any good.

I don’t understand here where I have to make changes in order to get the global test timeout in ember-cli.

+5
source share
2 answers

In tests.index.html
right after the line that says:

<script src="assets/test-support.js"></script>

Add

 <script> QUnit.config.testTimeout = 6400; // Why not 6400? This is a nice number </script> 
+1
source

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

QUnit.config.testTimeout = 60000;

+7
source

All Articles