Releases: qunitjs/qunit
3.0.0-rc1
Added
- Release: Add native ESM distribution, used automatically by Node.js when using the
importkeyword. #1551 - Core: Add module context to
beforeandafterhooks. This enables inheritance between parent and child modules, and fixes leaks between last test andafterhooks. (Ray Cohen @raycohen) #1328 - Core: Add
QUnit.config.reporters.htmlfor disabling the HTML Reporter. #1711 - Core: Export
QUnit.urlParamsunconditionally. 57c2dbcffc - Core: Export
QUnitglobal unconditionally. #1771
Changed
- Core: Enable a default test timeout of 3 seconds. #1483
- Core: Promote warning "Cannot add … hook outside the containing module" to error. (Ray Cohen @raycohen) #1576
- Core: Promote warning "QUnit.module() callback must not be async" to error. (Ray Cohen @raycohen) #1600
- Core: Promote warning "Unexpected test after runEnd" to error. #1377
- Core: Promote "No tests were run." from fake test to native error. #1790
- Assert: Change
assert.expect()to excludeassert.step()calls from count. (Kyle Simpson @getify) #1226 - HTML Reporter: New design with fresh color palette and improved color contrast. View demos in #1774.
- Faster UI rendering, now instantly instead of after DOM-ready. #1793
- Faster headless execution, when
id=qunitelement does not exist. #1711 - Add support for displaying early errors. #1786
- Change assertion count in toolbar to test count. #1760
- Change
#qunit-bannerfrom H2 to DIV, to fix WCAG compliance. #1427 - Change
#qunit-testresultfrom P to DIV, to fix HTML serialization. #1301 - Change runtime in toolbar from milliseconds to seconds. #1760
- Fix color constrast of details in failed test results. #1803
- Fix text selection to exclude "Rerun" link. 6becc199e0
- Fix overflow and scrollbar issues. #1603
- Fix adding
runningclass to test items. 1551120536
Fixed
- CLI: Fix confusing "No tests" message after an early uncaught error. #1790
- Core: Fix internal
QUnit.config.currentModulefor the initial unnamed module to be a complete object. 5812597b7f - Core: Fix crash when "bad thenable" is returned from global module hook. 3209462b88
- Core: Fix crash when mixing test.only() with module.only(). 99aee51a8a
- Core: Fix QUnit.config.maxDepth to allow changes at runtime. QUnit.dump.maxDepth is now a live alias to
QUnit.config.maxDepth. 0a26e2c883
Removed
- Core: Remove support for Node.js 10-16. Node.js 18 or later is required. (@NullVoxPopuli) #1727
- Core: Remove support for PhantomJS. (Steve McClure @smcclure15) #1505
- Core: Remove built-in export for AMD. You can continue to load your application and your QUnit tests with AMD/RequireJS. This change only affects the loading of the qunit.js file itself. Example: Loading with RequireJS. (@NullVoxPopuli) #1729
- Core: Remove deprecated
QUnit.load(). #1084 - Core: Remove deprecated
QUnit.onError()andQUnit.onUnhandledRejection()in favor ofQUnit.onUncaughtException(). - HTML Reporter: Remove support for legacy markup. Use
<div id="qunit">instead. Check Browser Runner § Getting started.
2.25.0
Added
- Core: Add
QUnit.config.testFilterto programmatically filter tests. (@NullVoxPopuli, @gbudjeakp) #1814
2.24.3
Fixed
- CLI: Fix TAP compliance for test plan when using
QUnit.test.only(). 4b87bc6aa5
2.24.2
Fixed
- CLI: Fix TAP compliance for colon in unquoted YAML diag. dbc02fb9fe
2.24.1
✨ Check out the new QUnit Blog on qunitjs.com. We're also on Mastodon and Bluesky.
Fixed
- CLI: Fix TAP compliance for actual/expected indent and skip/todo colors. b4d48fc710
- CLI: Fix TAP compliance for early errors (e.g. syntax error in test file). 01f7780bd8
- Core: Add memory to late
errorevent listeners, to improve reporting of early errors. 7c2f871ac3
2.24.0
FYI:
- ✨ There is a new QUnit Blog on qunitjs.com. We're also on Mastodon and Bluesky.
- 📗 There are new Guides, Support, and Chat sections on qunitjs.com.
Including best practices and examples for async tests, callbacks, and event-based code.
Added
-
CLI: Add
.mjsand.cjsto the default file extensions when reading a test directory.These have been monitored by watch mode since QUnit 2.18, but were not loaded or executed
unless you passed them as individual files, or used your own glob liketest/*.{js,mjs,cjs}.If you currently pass a directory to the QUnit CLI and have matching
.mjsor.cjs
files that should not be executed, you can opt-out by passingtest/*.jsor
test/**/*.jsexplicitly instead oftest/. -
CLI: Add stacktrace cleaning by omitting or greying out internal QUnit and Node.js frames in TAP reporter. #1795. #1789
Learn more about Cleaner stack traces on the QUnit Blog.
-
Core: Add
QUnit.config.reporters.tapfor enabling TAP via preconfig. #1711 -
Core: Add memory to the
runEndevent to allow late listeners. This helps browser integrations that only relay a summary. 27a33d1593
Fixed
- HTML Reporter: Fix unexpected pointer cursor on "Source:" label. f8cce2bb06
- HTML Reporter: Faster "Hide passed" toggling on large test suites. b13ade0fd7
2.23.1
Fixed
- CLI: Fix support for strict TAP parsers by limiting colors to test names. #1801
- CLI: Fix confusing
--seedoption eating the file argument. #1691 - CLI: Remove confusing
expected: undefinedunder error messages in TAP reporter. #1794 - HTML Reporter: Fix broken "Rerun without max depth" link. da0c59e101 (see also 91db92dbc5, 73c03cf277)
- HTML Reporter: Fix
<label>to wrap<select>for multi-value urlConfig item. #1773
2.23.0
Added
- Core: Add automatic labels in
QUnit.test.each()to simple array values. (@vtintillier, @Krinkle) #1733
2.22.0
Added
- Core: Add
QUnit.test.if()andQUnit.module.if(). (@englercj, @Krinkle, @smcclure15) #1772
2.21.1
Deprecated
- Assert: Add notice about upcoming change in how
assert.expect()counts steps forassert.verifySteps(). (@getify, @Krinkle) #1226