-
Notifications
You must be signed in to change notification settings - Fork 780
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs: Improve callback docs and integrate js-reporters events spec
== Integrate js-reporters spec == Keep the link to the js-reporters project for now, but no longer rely on it for discovery. The spec was written for implementors, which makes it a suboptimal reading experience for end-users. It also suffered from numerous nullable properties that in practice with QUnit are either never null or always null. In our docs, I've left these off or explicitly described them in their reliable non-null form to avoid any doubt or confusion over how or why they behave a certain way. Note that as of js-reporters 2.0, much of the spec has been removed which QUnit currently still implements for compatibility (such as upfront recursively declared child suites). These have not been documented and will be removed in QUnit 3.0. Ref https://github.com/js-reporters/js-reporters/releases/tag/v2.0.0. The integration of the spec, rather than improving or creating a page in the js-reporters repo for end-users, is motivated by qunitjs/js-reporters#133, in which I conclude that for now it is a better use of our effort for any re-usable cross-framework reporters to consume TAP rather than tight runtime coupling. This also has the benefit of not pushing down the "serialize actual value" and "format a diff" problems down to end-consumers, which in practice are often done poorly or not at all. == Document unofficial `done` details == For `done()`, the `details.modules` property was added by commit 168b048 in QUnit 1.16 (2014) for internal use by HTML Reporter. It was never documented, however. It originally came with a `test` property as well, but that hasn't been in use since commit 43a3d87 in QUnit 2.7 (2018). Keep this for now since it's not adding delay or complexity, but I've left a note to remove this in QUnit 3.0. Document the rest as now-officially supported, with retroactive changelog. Also document the oft-overlooked caveat with the legacy assertion counts exposed from `QUnit.done()`. I believe the community has large moved away from using the data provided by this callback. For example, gruntjs/grunt-contrib-qunit#137. Recommend `on('runEnd')` instead.
- Loading branch information
Showing
12 changed files
with
223 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.