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
While each is well-documented, and describes when it runs, and how (sync or async), we don't have yet provided an explicit overview of the overall order of events. Where this matters most is:
between QUnit.begin() and QUnit.on('runStart') which logically run at the same time. Idem for QUnit.done() and QUnit.on('runEnd'). Consider a sentence like "QUnit.config.urlConfig modifications must be made before QUnit.begin". Does that mean runStart is fine, or is that too late? And is that supported or accidental?
between hooks.afterEach and QUnit.testDone(), where the order is not obvious per se, ref New test reporter hook #1475.
Inspired by #1328 (@raycohen), where afaik we did not change this order so this page could be version agnostic I think? (e.g. applicable to both QUnit 2 and 3).
We have:
While each is well-documented, and describes when it runs, and how (sync or async), we don't have yet provided an explicit overview of the overall order of events. Where this matters most is:
QUnit.begin()
andQUnit.on('runStart')
which logically run at the same time. Idem forQUnit.done()
andQUnit.on('runEnd')
. Consider a sentence like "QUnit.config.urlConfig
modifications must be made before QUnit.begin". Does that meanrunStart
is fine, or is that too late? And is that supported or accidental?hooks.afterEach
andQUnit.testDone()
, where the order is not obvious per se, ref New test reporter hook #1475.Life cycle
I wrote up the following to get us started.
QUnit.on('runStart')
[reporter, sync]QUnit.begin()
[plugin, async-await]QUnit.on('suiteStart')
[reporter, sync]QUnit.moduleStart()
[plugin, async-await]QUnit.on('testStart')
[reporter, sync]QUnit.testStart()
[plugin, async-await]hooks.before()
[testing, async-await]QUnit.hooks.beforeEach()
[plugin, async-await]hooks.beforeEach()
[testing, async-await]QUnit.test()
function [testing, async-await]QUnit.log()
[plugin, sync]hooks.afterEach()
[testing, async-await]QUnit.hooks.afterEach()
[plugin, async-await]hooks.after()
[testing, async-await]QUnit.on('testEnd')
[reporter, sync]QUnit.testDone()
[plugin, async-await]QUnit.on('suiteEnd')
[reporter, sync]QUnit.moduleDone()
[plugin, async-await]QUnit.on('runEnd')
[reporter, sync]QUnit.done()
[plugin, async-await]Would a table be clearer?
QUnit.on('runStart')
QUnit.begin()
QUnit.on('suiteStart')
QUnit.moduleStart()
QUnit.on('testStart')
QUnit.testStart()
hooks.before()
QUnit.hooks.beforeEach()
hooks.beforeEach()
QUnit.test()
functionQUnit.log()
hooks.afterEach()
QUnit.hooks.afterEach()
hooks.after()
QUnit.on('testEnd')
QUnit.testDone()
QUnit.on('suiteEnd')
QUnit.moduleDone()
QUnit.on('runEnd')
QUnit.done()
The text was updated successfully, but these errors were encountered: