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
The run duration, test duration, and assert offset time were still
measured with Date.now(), and with a fallback that is no longer needed
since Date.now() is available in all supported browsers (IE9+).
In Firefox, Date.now() is generally a whole number. In Chrome, this
has recently changed to expose fractions. This resulted in a UI
regression where the QUnit runner exposes quite long decimals that
aren't useful.
Since perf.now() always has detailed fractions, avoid this regression
spreading to Firefox and round the numbers in the UI.
While at it, improve details of test failures from the
internal html-reporter test.
Fixes#1678.
Follows-up b70af72, which corrected this in the UI, but this
means any plugins and integrations reporting `details.runtime` are
still affected by the needless precision.
This affects:
* `QUnit.log`, `QUnit.testDone`, `QUnit.moduleDone` and `QUnit.done`.
* `on('testEnd')`, `on('suiteEnd')`, and `on('runEnd')`.
I was initially cautious about this as I worried that perhaps
consumers would accumulate these and then become increasingly less
accurate in large test suites where perhaps most leaf nodes round to
0ms. However I have no such case in practice. Generally, for total
times the reported totals can be, should be, and are being used.
Ref #1678.
In Firefox:
In Chrome:
Tell us about your runtime:
The text was updated successfully, but these errors were encountered: