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
How are you running QUnit? (e.g., script, testem, Grunt): grunt
What are you trying to do?
Code that reproduces the problem:
git clone qunit & yarn dev
Add the following code to dist/qunit.js
a. console.logs after function runLoggingCallbacks(key, args) {
function runLoggingCallbacks(key, args) {
console.log('runLoggingCallbacks called for '+key)
var callbacks = config.callbacks[key];
b. console.logs before if (module.testsRun === numberOfTests(module)) {
}).then(function () {
console.log('module.testsRun === numberOfTests(module)');
console.log(module.testsRun +' === ' +numberOfTests(module))
if (module.testsRun === numberOfTests(module)) {
var completedModules = [module];
Point a browser to http://localhost:8000/test/string-filter.html
Open up browser console
If you have any relevant configuration information, please include that here:
What did you expect to happen?
Expected moduleDone callback (from the suiteEnd event) to be called.
What actually happened?
moduleDone was not called because module.testsRun does not equal numberOfTests(module)
1 of the 3 test was filtered out and not ran. Leaving only 2 test to be ran.
So module.testsRun = 2 while numberOfTests(module) = 3
Regardless, I believe moduleDone should still be called.
The text was updated successfully, but these errors were encountered:
…filters
Previously, the `suiteEnd` event and the `moduleDone` callback
were fired when we've run all the tests, based on counting the
number of registered tests in a module and the number of tests
actually run.
This logic does not hold up when there are active module/test filters
used in the runner, because then some of the registered tests will
never run.
The added tests demonstrate the issue, as they will fail without
the src patch. Several of the `suiteEnd` events would not fire.
The impact of this bug was that the `suiteEnd` event and `moduleDone`
callback don't fire if there were active filters such as `--filters`
in the CLI or via the "Filter" field in the HTML Reporter.
This in turn meant that reporters such as TAP would sometimes
reflect the structure of the test suite in an odd way due to
it sometimes missing an "end" event for a group of tests.
Fixes#1416.
Closes#1417.
Tell us about your runtime:
What are you trying to do?
Code that reproduces the problem:
git clone qunit
&yarn dev
dist/qunit.js
a. console.logs after
function runLoggingCallbacks(key, args) {
b. console.logs before
if (module.testsRun === numberOfTests(module)) {
http://localhost:8000/test/string-filter.html
If you have any relevant configuration information, please include that here:
What did you expect to happen?
Expected
moduleDone
callback (from thesuiteEnd
event) to be called.What actually happened?
moduleDone
was not called because module.testsRun does not equal numberOfTests(module)1 of the 3 test was filtered out and not ran. Leaving only 2 test to be ran.
So
module.testsRun = 2
whilenumberOfTests(module) = 3
Regardless, I believe
moduleDone
should still be called.The text was updated successfully, but these errors were encountered: