npm / qunit
qunit
What changed in qunit 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-29.
10 breaking3 new APIs and options3 behavior and defaults5 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initqunit 317 changes
Breaking changes 10
QUnit no longer provides a built-in AMD export for the qunit.js file; applications and tests can still be loaded with AMD/RequireJS.
New releases are no longer published to the Bower registry.
The undocumented details.modules[].tests field is removed from the QUnit.begin() event.
Legacy HTML Reporter markup is no longer supported; use <div id="qunit"> instead.
The no-tests condition is now reported as a native error instead of a fake test.
Support for Node.js 10–16 is removed; Node.js 18 or later is required.
Support for PhantomJS is removed.
The undocumented QUnit.dump.HTML property is removed.
The undocumented QUnit.dump.multiline property is removed.
Using an async QUnit.module() callback is now an error instead of a warning.
New APIs and options 1
QUnit adds a native ESM distribution, which Node.js uses automatically when importing with the import keyword.
Behavior and default changes 1
The QUnit global is now exported unconditionally.
Fixes and other changes 5
The after hook receives module context, enabling inheritance between parent and child modules and fixing leaks between the last test and after hooks.
The before hook receives module context, enabling inheritance between parent and child modules and fixing leaks between the last test and after hooks.
The confusing "No tests" message after an early uncaught error is fixed.
Fixes a crash when a global module hook returns a bad thenable.
Fixes a crash when test.only() is used together with module.only().
qunit 24 changes
New APIs and options 2
Introduces QUnit.config.ignoreUnhandledRejections.
The CLI supports using a local script with --reporter.
Behavior and default changes 2
assert.rejects() now returns the error value.
assert.throws() now returns the error value.