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
As I discussed with the rest of the QUnit core team in Chicago, I think that QUnit.config.{beforeEach|afterEach} should be changed to be functions rather than setters.
This is beneficial in the following ways:
Allows consumers to easily supply more than one beforeEach/afterEach callback.
Allow plugins such as custom assertions that currently have to use hacky hooks via the QUnit.testStart/QUnit.testDonelogging callbacks to achieve global beforeEach/afterEach behavior to get a proper extension point with access to the correct Test and Assert contexts rather than needing to rely on QUnit.config.current. Clear evidence of this can be seen in the JamesMGreene/qunit-assert-step @ qunit-assert-step.js#L21-L26.
Will be required for API consistency-sake anyway [in v2.x] if my forthcoming PR proposal for Issue Allow nested suites (modules) #543 (nested suites) is accepted.
As I discussed with the rest of the QUnit core team in Chicago, I think that
QUnit.config.{beforeEach|afterEach}should be changed to be functions rather than setters.This is beneficial in the following ways:
beforeEach/afterEachcallback.QUnit.testStart/QUnit.testDonelogging callbacks to achieve globalbeforeEach/afterEachbehavior to get a proper extension point with access to the correct Test and Assert contexts rather than needing to rely onQUnit.config.current. Clear evidence of this can be seen in the JamesMGreene/qunit-assert-step @ qunit-assert-step.js#L21-L26.v2.x] if my forthcoming PR proposal for Issue Allow nested suites (modules) #543 (nested suites) is accepted.