You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What environment are you running QUnit in? (e.g., browser, Node): browser (Chrome) and Node
How are you running QUnit? (e.g., script, testem, Grunt): either via cli, or karma-qunit, or in the browser
What are you trying to do?
We have a fairly large test suite with several thousand tests in it and with latest QUnit it takes forever to start and eventually it seems to run into a fairly impressive recursive call. This repro is an over-simplified version:
for(leti=0;i<100;i++){QUnit.module('suite'+i,{beforeEach: function(){// do something},afterEach: function(){// do something}});for(letj=0;j<100;j++){QUnit.test('test'+j,function(assert){assert.ok(j!==98);});}}
What did you expect to happen?
All test suites should finish and report the results.
What actually happened?
QUnit fails before finishing the test run with the following exception:
Uncaught RangeError: Maximum call stack size exceeded
at Array.join (native)
at extractStacktrace (qunit.js:1074)
at Test.run (qunit.js:1518)
at qunit.js:1737
at advanceTaskQueue (qunit.js:1129)
at advance (qunit.js:1110)
at advanceTestQueue (qunit.js:1155)
at advance (qunit.js:1113)
at advanceTestQueue (qunit.js:1155)
at advance (qunit.js:1113)
The text was updated successfully, but these errors were encountered:
nobody@fresh$ qunit --version
2.9.2
nobody@fresh$ time qunit tmp.js
…
ok 9998 suite99 > test97
not ok 9999 suite99 > test98
---
message: "failed, expected argument to be truthy, was: false"
severity: failed
actual: false
expected: true
stack: at Object.<anonymous> (/Temp/tmp.js:13:20)
...
ok 10000 suite99 > test99
1..10000
# pass 9900
# skip 0
# todo 0
# fail 100
real 0m3.127s
It has the expected failure, and completes the ~ 10,000 times in about 3 seconds (this is inside a container, would presumably be quicker outside of that).
Tell us about your runtime:
What are you trying to do?
We have a fairly large test suite with several thousand tests in it and with latest QUnit it takes forever to start and eventually it seems to run into a fairly impressive recursive call. This repro is an over-simplified version:
What did you expect to happen?
All test suites should finish and report the results.
What actually happened?
QUnit fails before finishing the test run with the following exception:
The text was updated successfully, but these errors were encountered: