-
Notifications
You must be signed in to change notification settings - Fork 782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List modules and tests names on QUnit.begin #677
Milestone
Comments
leobalter
changed the title
List modules and tests names on
List modules and tests names on QUnit.begin
Oct 3, 2014
QUnit.begin
@leobalter will you have some time to implement this? |
leobalter
added a commit
to leobalter/qunit
that referenced
this issue
Dec 1, 2014
QUnit.begin now send the callback parameter with the modules property, which now is an Array of objects each one with a name property representing the module name and a tests property with an Array of its respective tests objects with their respective names and ids. moduleDone and moduleStart also send in the callback parameter a tests property containing an Array of its respective tests names. config.moduleFilter is now removed to use only urlParams.module. The HTML Reporter will logs tests since from the begin callback listing the tests from there, this prevents logging them by their execution, as they should be listed on their given order. Fixes qunitjs#674 Fixes qunitjs#677
Krinkle
added a commit
that referenced
this issue
Jul 14, 2024
== Background In QUnit 1.16.0, as part of #677, commit 168b048 changed the testStart() callback to no longer always create `qunit-test-output-TESTID` with class "running", but instead eagerly create them ahead of time via a QUnit.begin() handler (without the "running" class), and then during testStart() set the class to "running", or lazily create the item then. This introduced a bug where, late-defined tests lack the "running" class. This bug then later spread to all items as we now treat all tests as late-defined. In QUnit 2.8.0, as part of #1323, this was attempted to be restored, but it added it to a different element, namely `#qunit-testresult-display` which from what I could find in our history, never previously carried this class. This might've been done by acciddent, but in any case, let's keep that. == What * Restore this to simplify the CSS, and makes it more developer-friendly to theme QUnit by not having to list all statuses, and/or having to use a direct-child selector like `#qunit-tests > li` to reliably select test items (and not other lists like the assertion list). * For back-compat, keep the running class on `qunit-testresult-display` but move it to onBegin() since there is no reason to set this again and again on every test since it never changes. * Document these bits in the recently created "Theme API" section.
Krinkle
added a commit
that referenced
this issue
Jul 14, 2024
== Background In QUnit 1.16.0, as part of #677, commit 168b048 changed the testStart() callback to no longer always create `qunit-test-output-TESTID` with class "running", but instead eagerly create them ahead of time via a QUnit.begin() handler (without the "running" class), and then during testStart() set the class to "running", or lazily create the item then. This introduced a bug where, late-defined tests lack the "running" class. This bug then later spread to all items as we now treat all tests as late-defined. In QUnit 2.8.0, as part of #1323, this was attempted to be restored, but it added it to a different element, namely `#qunit-testresult-display` which from what I could find in our history, never previously carried this class. This might've been done by acciddent, but in any case, let's keep that. == What * Restore this to simplify the CSS, and makes it more developer-friendly to theme QUnit by not having to list all statuses, and/or having to use a direct-child selector like `#qunit-tests > li` to reliably select test items (and not other lists like the assertion list). * For back-compat, keep the running class on `qunit-testresult-display` but move it to onBegin() since there is no reason to set this again and again on every test since it never changes. * Document these bits in the recently created "Theme API" section.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requisite for #674.
This is necessary to set the tests and modules order for loggings, specially our detached html reporter.
Relates to #662 and #472
The text was updated successfully, but these errors were encountered: