Currently in QUnit.load, we immediately invoke the logging callbacks for "begin" (a.k.a. "runStart") when the page loads, even if QUnit.config.autostart is set to false and thus won't actually begin yet: src/core.js#L404-L406
This seems inaccurate both from a timing perspective (for reporters marking the time of events) as well as from a Test.count perspective: if the run hasn't begun yet, it may be because there are still tests loading asynchronously, and thus their count would not be included in the data sent with the "begin" event.
This logging callback should be called from somewhere inside the QUnit.start execution stack [and only fired once, when the test run actually begins] instead.
Currently in
QUnit.load, we immediately invoke the logging callbacks for "begin" (a.k.a. "runStart") when the page loads, even ifQUnit.config.autostartis set tofalseand thus won't actually begin yet: src/core.js#L404-L406This seems inaccurate both from a timing perspective (for reporters marking the time of events) as well as from a
Test.countperspective: if the run hasn't begun yet, it may be because there are still tests loading asynchronously, and thus their count would not be included in the data sent with the "begin" event.This logging callback should be called from somewhere inside the
QUnit.startexecution stack [and only fired once, when the test run actually begins] instead.