QUnit 3.0 Roadmap and feedback: #1498
- Release: Add native ESM distribution, used automatically by Node.js when using the
import
keyword. #1551 - Core: Add support for late
runEnd
event listeners. This helps browser integrations that only relay a summary. 8f25f26264 - Core: Add support for late
error
event listeners, to improve reporting of early errors. #1786 - Core: Add
QUnit.config.reporters
to enable TAP via preconfig, or to declaratively disable HTML Reporter for headless CI. #1711 - Core: Export
QUnit.urlParams
unconditionally. 57c2dbcffc - Core: Export
QUnit
global unconditionally. #1771 - CLI: Add
.mjs
and.cjs
to the default file extensions when reading a test directory. - CLI: Add stacktrace cleaning by omitting or greying out internal QUnit or Node.js frames in TAP reporter. #1795. #1789
- HTML Reporter: Enable UI rendering before DOM-ready. #1793
- HTML Reporter: Add support for displaying early errors in the UI. #1786
- Core: Enable a default test timeout of 3 seconds. #1483
- Core: Promote warning "Cannot add … hook outside the containing module" to error. (Ray Cohen) #1576
- Core: Promote warning "QUnit.module() callback must not be async" to error. (Ray Cohen) #1600
- Core: Promote warning "Unexpected test after runEnd" to error. #1377
- Core: Promote "No tests were run." from fake test to native error. #1790
- Core: Change
before
andafter
hooks to run with module context. This enables inheritence between parent and child modules, and fixes leaks between last test and "after" hooks. (Ray Cohen) #1328 - Assert: Change
assert.expect()
to excludeassert.step()
calls from count. #1226 - HTML Reporter: New theme design and structure. Before and after demo in #1774.
- Fix overflow and scrollbar issues. #1603
- Change
#qunit-banner
from H2 to DIV, to fix WCAG compliance. #1427 - Change
#qunit-testresult
from P to DIV, to fix HTML serialization. #1301 - Change run time in toolbar from milliseconds to seconds. #1760
- Add
user-select: none;
to "Rerun" link and "runtime" indicator. 6becc199e0 - Add
running
class to test items. 1551120536 - Remove assertion count from toolbar in favor of test count. #1760
- CLI: Fix confusing "No tests" message after an early uncaught error. #1790
- Core: Fix internal
QUnit.config.currentModule
for 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 - HTML Reporter: Fix unexpected pointer cursor on "Source:" label. 52bfa69645
- HTML Reporter: Faster "Hide passed" toggling on large test suites. a729421411
- HTML Reporter: Avoid HTML Reporter overhead when no
id=qunit
element exists. #1711
- Core: Remove support for Node.js 10-16. Node.js 18 or later is required. #1727
- Core: Remove support for IE 9 and IE 10. IE 11 remains supported. #1725
- Core: Remove support for PhantomJS.
- Core: Remove built-in export for AMD. You can still load your application and your QUnit tests with AMD/RequireJS. This 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 of QUnit.onUncaughtException(). - Core: Remove undocumented
details.modules[].tests
from QUnit.begin() event. - Core: Remove undocumented
QUnit.dump.HTML
andQUnit.dump.multiline
. 8e881f5087 - HTML Reporter: Remove support for legacy markup. Use
<div id="qunit">
instead. Check Browser Runner § Getting started. - Build: Discontinue publication to Bower for future releases. Check How to install or Getting started. #1677
- CLI: Fix support for strict TAP parsers by limiting colors to test names. #1801
- CLI: Fix confusing
--seed
option eating the file argument. #1691 - CLI: Remove confusing
expected: undefined
under 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
- Core: Add automatic labels in
QUnit.test.each()
to simple array values. #1733
- Core: Add
QUnit.test.if()
andQUnit.module.if()
. (Timo Tijhof) #1772
- Assert: Add notice about upcoming change in how
assert.expect()
counts steps forassert.verifySteps()
. #1226
- Core: Fix missing second frame in
QUnit.stack()
in Safari. #1776 - Core: Fix stacktrace cleaner to also support clean traces on URLs with host ports. #1769
- HTML Reporter: Fix reversed order after clicking "Hide passed". #1763
- HTML Reporter: Fix encoding of label for urlConfig multi-value item.
- Assert: Add
assert.closeTo()
. (Timo Tijhof) #1735 - Core: Add support for flat preconfig via environment/global variables. (Timo Tijhof)
- Core: Deprecate
QUnit.load()
and document migration path at https://qunitjs.com/api/QUnit/load/. (Timo Tijhof) #1743 - Core: Deprecate unset testTimeout for tests taking longer than 3 seconds. (Timo Tijhof) #1483
- Core: Fix compatibility with
sinon.useFakeTimers
in IE 10 and IE 11. (Timmy Willison) #1738 - Core: Fix hanging
assert.async()
afterassert.timeout()
. (Timo Tijhof) #1705
- Core: Add
QUnit.reporters.perf
. (Timo Tijhof) #1714
- Assert: Add type check for
assert.async()
parameter. (Zixin Yin) #1721 - HTML Reporter: Remove units for 0 values in qunit.css. (Hareesh) #1715
- Core: Faster
inArray
by using Array.prototype.includes when possible. (Izel Nakri)
- Core: Fix memory leak via
config.timeoutHandler
from last async test. (Sergey Astapov)
- Assert: Restore how deepEqual treats imposter objects. (Timo Tijhof) #1706
- Core: Faster diffing for
config.noglobals
by refactoring slow mutations. (Izel Nakri) #1697 - Assert: Improve performance of
QUnit.equiv()
. (Izel Nakri) #1700 - Assert: Faster deepEqual for Map values by avoiding typeEquiv calls. (Timo Tijhof)
- Assert: Faster deepEqual by reducing internal objectType checks. (Timo Tijhof)
- Assert: Faster deepEqual by using re-assignment for internal pairs. (Timo Tijhof)
- Core: Fix inaccurate count in reporter output after re-run. #1687
- CLI: Fix MaxListeners warning in long-running watch mode. #1692
- HTML Reporter: Restore float-clear for narrow viewports. 87c90ce2e0
- CLI: Add
--module
option. (Shachar) #1680 - Core: Add
moduleId
toQUnit.begin()
details object.
- Core: Fix event "runtime" data to be rounded to milliseconds.
- Core: Fix pretty stacktrace shortening to work on Windows.
- HTML Reporter: Faster toolbar setup by reusing
beginDetails.modules
.
- HTML Reporter: Improve accessibility and design of the module filter. (Timo Tijhof) #1664
- HTML Reporter: Improve fuzzy-matching of the module filter. (Timo Tijhof) #1685
- HTML Reporter: Faster rendering of module filter results. #1685, #1664
- HTML Reporter: Fix retention of state over multiple module searches. #1683
- HTML Reporter: Fix runtime to be rounded in Chromium. #1678
- HTML Reporter: Fix source attribution for test definitions. #1679
- Core: Fix preconfig support in SpiderMonkey and other environments. 0befe2aafe
- Core: Improve performance of async pauses with native Map when available. aa7314b431
- Assert: New
assert.propContains()
for partial object comparison. (Izel Nakri) #1668 - Core: Add
QUnit.hooks
to globally add beforeEach and afterEach. (Timo Tijhof) #1475 - CLI: Add support for watching
.ts
files when TypeScript is used. (Timo Tijhof) #1669 - CLI: Add support for watching
.json
,.cjs
, and.mjs
files. #1676
- CLI: Fix ESM file imports on Windows to use file-protocol URLs. (Timo Tijhof) #1667
- CLI: Improve performance of watch mode by recursively ignoring directories. (Timo Tijhof) #1676
- CLI: Reduce npm install size by 35 kB. (Timo Tijhof) node-watch#115
- Core: Correctly ignore late tests after a nested
QUnit.module.only()
closure. (Steve McClure) #1645 - Core: Restore fake test for "No tests were run" message. (Timo Tijhof) #1652
- HTML Reporter: Restore URL parameter reading. (Timo Tijhof) #1657
- HTML Reporter: Fix
display: none
regression with the "global failure" message. (Timo Tijhof) #1651
- HTML Reporter: Add "Rerun failed tests" link. (Jan Buschtöns) #1626
- Core: New
error
event for bailing on uncaught errors. (Timo Tijhof) #1638
- Core: Improve warning for incorrect hook usage to include module name. (Chris Krycho) #1647
-
Core: The internal
QUnit.onError
andQUnit.onUnhandledRejection
callbacks are deprecated. #1638These were undocumented, but may have been used in a fork or other custom runner for QUnit. Switch to the supported
QUnit.onUncaughtException
instead.
- Assert: Improve validation handling of
assert.throws()
andassert.rejects()
. (Steve McClure) #1637 - Core: Ensure skipped child module hooks don't leak memory. (Ben Demboski) #1650
- Core: Fix bad module nesting when module closure throws global error. #1478
- Core: Fix reporting of uncaught errors during
QUnit.begin()
. (Timo Tijhof) #1446 - Core: Fix reporting of uncaught errors during or after
QUnit.done()
. (Timo Tijhof) #1629
-
Core: New
QUnit.test.each()
method for data providers. (ventuno) #1568 -
Core: New
failOnZeroTests
configuration option. (Brenden Palmer) -
Core: New
QUnit.reporters
interface. (Timo Tijhof) f8948c9 js-reporters#133This introduces support for using the
tap
reporter in a browser. This was previously limited to the CLI.
- Assert: Indicate which test a drooling
assert.async()
callback came from. (Steve McClure) #1599
- Core: Warn when a module callback has a promise as a return value. (Ray Cohen) #1600
- Core: Fix
QUnit.module.only()
regression where some unrelated modules also executed. (Steve McClure) #1610 - CLI: Improve ESM detection. (Steve McClure) #1593
- HTML Reporter: Increase contrast and use richer colors overall. (Timo Tijhof) #1587
- HTML Reporter: Trim whitespace of the filter input. (Nathaniel Furniss) #1573
- CLI: Upgrade
js-reporters
to 2.0.0. #1577
- Core: Warn when setting hooks for a different module. (Ray Cohen) #1586
- Assert: Fix
assert.throws()
to fail gracefully when expected class does not match. (Steve McClure) #1530 - CLI: Fix TAP output to support cyclical objects. (Zachary Mulgrew) #1555 js-reporters#104
- CLI: Fix TAP output for the
Infinity
value, previously becamenull
. (Timo Tijhof) #1406 - CLI: Fix TAP output going silent if
console
object is mocked. (Timo Tijhof) #1340
- CLI: Upgrade
commander
to 7.1.0. (Timo Tijhof) #1564
- Core: Restore strict mode compatibility (Edward Faulkner) #1558
- HTML Reporter: Check for undefined
testItem
in testDone callback. (Timo Tijhof)
- HTML Reporter: Use a fixed header with scrollable test results. (Bryan Crotaz) #1513
- Core: Add official support for SpiderMonkey runtime. (Timo Tijhof) #1535
- HTML Reporter: Set
main
andnavigation
ARIA roles. (Steve McClure) #1427 - Core: Fix
QUnit.module.only
logic for unscoped modules. (Steve McClure) #1272 - Assert: Fix
assert.timeout()
bug causing a non-async test to fail. #1539
- Core: Log test name as part of "Assertion after test" failures. (brandonocasey) #1517
- CLI: Add native support for ESM .mjs files on Node 12+. (Timo Tijhof) #1465
- HTML Reporter: Deprecate PhantomJS. (Steve McClure)
- Core: Count tests run so that
suiteEnd
emits correctly with active filters. (Stephen Yeung) #1416 - Core: Fix test counter bug when nesting invalid test functions. (Timo Tijhof)
- HTML Reporter: Avoid leaking
Map
global in older browsers. (Timo Tijhof)
- Core: Add
QUnit.test.*
aliases forQUnit.only()
,QUnit.skip()
, andQUnit.todo()
. (Steve McClure) #1496 - Assert: Support arrow functions in
assert.throws()
expected callback. (Steve McClure) #1492
- CLI: Update
node-watch
andcommander
dependencies. (Timo Tijhof) #1500
- Core: Deprecate
QUnit.extend()
. (Steve McClure)
- CLI: Fix 'qunit' require error on Node 10 if qunit.json exists. #1484
- CLI: Align
actual
whitespace withexpected
in TapReporter. (Robert Jackson) js-reporters/js-reporters#107 #1481
- CLI: Improve startup performance by using
tiny-glob
. #1476
- Assert: New strict boolean
assert.true()
andassert.false()
methods. (Ventuno) #1445 - Docs: Redesign of https://qunitjs.com. (Trent Willis) #1458
- HTML Reporter: New fuzzy search when typing in the module filter. (Ventuno) #1440
- HTML Reporter: Hide skipped tests also when
hidepassed
is set. (Ray Cohen) #1208
- CLI: Improve performance for non-glob arguments. (SparshithNRai) #1385
- CLI: Fix error with
--watch
option, affected Node 14 on Linux. #1448 - Core: Fix "No tests" to check test count instead of assert count. (Jessica Jordan) #1405
- All: Remove support for Node 6 and Node 8, require Node 10+.
- HTML Reporter: Scope QUnit UI button style to not affect
#qunit-fixture
. (XhmikosR) #1437
- Core: Run all
QUnit.only
-marked tests. (Ventuno) #1436
- Docs: Add project logo to README. (Jim Lynch)
- HTML Reporter: Fix tab order for toolbar filters. (Eddy Lu)
- HTML Reporter: Display progress and runtime while test suite is executing. (Stefan Penner) #1398
- CLI: Ignore folders mentioned in the gitignore to improve performance. (SparshithNRai)
- Core: Defer getting the stack trace to improve performance. (Adam Byrne)
- Core: Let
assert.timeout()
replace the timeout ifconfig.timeout
was already set.
- Core: Ensure semaphores are balanced when timeout occurs. #1376
- HTML Reporter: Avoid inline styles to support CSP without
unsafe-inline
.
- Release: Restore missing files that were accidentally missing in the 2.9.0 npm package. #1368
- Assert: Report errors from
assert.throws()
as strings. #1333 - CLI: Reduce size of the npm package dependency tree. (Timo Tijhof) #1342
- HTML Reporter: Fix an unescaped
details.source
. (Shlomi Fish) #1341
- Core: Add support for async functions and Promise-returns to QUnit event handlers. These can now be used via
QUnit.begin
,QUnit.moduleStart
,QUnit.testStart
,QUnit.testDone
,QUnit.moduleDone
, andQUnit.done
. (Stephen Yeung) #1307 - Core: Add stack trace to uncaught error if the browser supports it. (Anand Thakker)
- HTML Reporter: Add a
running
class to list items, for use by plugins. This was previously removed in 2.7.0. #1323
- Core: Avoid breaking tests if the browser throws an error from
performance.measure
. (Gabriel Csapo)
- HTML Reporter: Add "User Timings" for each test to the browser's Performance Timeline. (Tobias Bieniek) #1296
- CLI: Remove need for
fsevents
extension by upgrading thesane
package. (Stefan Penner) #1314 - HTML Reporter: Fix XHTML output issue. (Shlomi Fish) #1317
- Assert: Remove redundant return statement from
assert.pushResult()
. (Ger Hobbelt) #1298 - CLI: Update
fsevents
extension for Node 10 compatibility. (Tobias Bieniek) #1295
- Core: Ensure module and test callbacks are released for GC. (Robert Jackson) #1279
- HTML Reporter: Disable autocomplete on module search input. (Christian) #1277
- CLI: New
--require
option. (Trent Willis) #1271
- Assert: Fail test if a non-string value is passed to
assert.step()
. - Assert: Recognize
undefined
and other falsy rejection values inassert.rejects()
. - Core: Throw an error if no tests are run.
- Assert: Clone steps array in
assert.verifySteps()
before exposing to logging callbacks. #1267 - Core: Ensure late-add high-priority tests are inserted in proper order. #1269
- HTML Reporter: Restore attributes on
#qunit-fixture
between tests. (Robert Jackson) #1250 - Assert: Fail test if using
assert.step()
withoutassert.verifySteps()
.
- Core: Release all processing locks when Promise rejects from a test. #1253
- Assert: New
assert.rejects()
method. (Robert Jackson) #1238 - CLI: Fail test if there are unhandled rejections, similar to uncaught errors. (Robert Jackson) #1241
- HTML Reporter: Fail test if there are unhandled rejections, similar to uncaught errors. (Robert Jackson) #1241
- Assert: The
assert.verifySteps()
method now resets the steps buffer, making it easier to use multiple times in a single test. #1233
- Core: Remove artificial delays from internal
setTimeout
processing code. #1246
- CLI: Add slight debounce to restarting tests on file watching.
- CLI: Catch file load failures and report as failing tests.
- CLI: Clear require cache of watched files between runs.
- CLI: List available reporters when option is specified with no value.
- CLI: Properly support watching files added after first run.
- HTML Reporter: Fix regression in error reporting.
- Assert: Fix assert.push deprecation link.
- Assert: New
assert.timeout()
for setting per-test timeout durations. - CLI: Better messaging on early exits.
- CLI: Default to non-zero exit code.
- CLI: Exit with non-zero status when no tests are run.
- Core: Add support for multiple callbacks in module hooks, such as via
hooks.beforeEach()
andhooks.afterEach()
. - Core: Fallback to
typeof obj
inQUnit.objectType
. - Core: New
QUnit.module.only()
method. - Core: New
QUnit.module.skip()
method. - Core: New
QUnit.module.todo()
method. - Core: Fix memory release of objects in equiv logic of
assert.deepEqual()
.
- Core: Support running in Web Workers. (Marten Schilstra) #1171
- CLI: Prefer local version of QUnit.
- HTML Reporter: Add specific diff for number types instead of str-diff. #1155
- Core: Fix bug calling hooks with skipped tests. #1156
- Assert: Allow assertions after async.
- Assert: Throw if async callback invoked after test finishes.
- Core: Ensure assertions occur while test is running.
- Core: Fix test instance memory leak. #1138
- Core: Slim assertions after reporting them.
- CLI: Introduce QUnit CLI. (Trent Willis) #1115
- CLI: Add file watching option.
- CLI: Add seed option.
- CLI: Add support for custom reporters.
- HTML Reporter: Display todo tests when
hidepassed
is set.
- Core:
Test#pushFailure
now callsTest#pushResult
internally.
- Core: Fix sessionStorage feature detection.
- Core: Support running in a sandboxed iframe.
- Core: New event emitter. (Trent Willis) #1087
- Core: New
QUnit.todo()
method. (Trent Willis) #1080 - Assert: New
assert.step()
andassert.verifySteps()
methods. (Trent Willis)(Trent Willis) #1075
- Core: QUnit.onError now expects error or error-like object.
- Core: Include "todo" in assertion event data.
- HTML Reporter: Ensure window.onerror return values are correct.
- Core: Fix start on Node when autostart is not set to true. #1105
- Core: Fix double begin when calling start in Node.
- Core: Rewrite QUnit.equiv to be breadth-first.
- Core: Optimize the "set" and "map" callbacks.
- Core: Fix console error in IE9. #1093
- All: Remove deprecated 1.x features.
- Assert: Deprecate
assert.push()
. - Core:
QUnit.start()
no longer requires callingQUnit.load()
first. - HTML Reporter: Add an "Abort" button.
- Core: Support a predefined QUnit.config.
- Core: Fix clearing of storage on done.
- Core: Always report if test previously failed.
- Core: New
config.storage
option. - Core: Load the onerror module.
- Core: Fix QUnit.equiv object methods comparison.
- Core: Support multiple nested modules hooks properly.
- Core: Fire moduleStart only when starting module for the first time.
- Core: Fire moduleDone when actually finished with module.
- HTML Reporter: Decouple from sessionStorage reordering logic.
- HTML Reporter: Fix expanding failed tests when collapse is false.
- HTML Reporter: Handle URL params named like
Object.prototype
properties. - Release: Use SPDX format in bower.json's license.
- Core: Prevent multiple "begin" events from calling
QUnit.load()
. - Core: Use callback-based pause/resume for better multi-pause isolation.
- HTML Reporter: Fix apply/reset button visibilty.
- Core: Ensure runtime for skipped tests is 0.
- Dump: New parser for
Symbol
type.
- All: Remove deprecated features.
- All: Remove
QUnit.config.autorun
. - All: Prevent async tests from having multiple resume timeouts.
- Assert: Remove
assert.throws()
signature with string expected value. - Dump: update typeOf to extract extra complex type definition.
- Core: New
before
andafter
module hooks. - Core: Decode "+" to " " (space) in url params.
- Core: Throw error if QUnit is already defined globally.
- HTML Reporter: Add reset/apply buttons in the module picker.
- HTML Reporter: Improve module picker accessibility. (Richard Gibson)
- HTML Reporter: Improve color/background order consistency. (Richard Gibson)
- HTML Reporter: Improve toolbar styles. (Richard Gibson)
- HTML Reporter: Add multi-select module dropdown. (Maciej Lato)
- All: Remove deprecated features.
- All: Remove
QUnit.config.autorun
. - Assert: Remove
assert.throws()
signature with string expected value. - Core: New
before
andafter
module hooks. - HTML Reporter: Add multi-select module dropdown.
- Core: Prevents "throws" keyword from breaking Rhino environments.
- Core: Be consistent in function type checks.
- Core: Move URL parameter handling to HTML Reporter.
- Core: Reintroduce
QUnit.config.module
. - Core: Stop splitting URL parameter values by commas.
- Core: New
moduleId
-based filtering. - Core: Introduce
QUnit.config.seed
for running tests in pseudo-random order. - Dump: Fix asymmetrical function dump argument spacing.
- HTML Reporter: Fix escaping of diffs.
- HTML Reporter: Add message explaining missing diff.
- HTML Reporter: Fix hidepassed element check.
- Assert: Treat "Set" and "Map" types as unordered in
QUnit.equiv
.
- Assert: New
assert.pushResult()
method. - Assert: Extend Assert methods to QUnit for backwards compatibility.
- HTML Reporter: Escape setUrl output.
- Assert: Improve speed of QUnit.equiv.
- Assert: Fully support Object-wrapped primitives in
assert.deepEqual()
. - Assert: Register notOk as a non-negative assertion.
- Core: Improve regular expression comparisons.
- Core: Support filtering by regular expression.
- HTML Reporter: Fix hidden test results under static parents.
- Assert: Expose
assert.raises()
to the global scope. - Assert: Add an optional
callCount
parameter toassert.async()
. - Core: New
QUnit.only()
method. - Core: Support Symbol types on
QUnit.equiv
. - Core: Make
QUnit.start
fails if called with a non-numeric argument. - Core: New nested scopes ability for modules.
- Core: Equivalency for descendants of null constructors.
- HTML Reporter: Add indicator for filtered test.
- HTML Reporter: Collapse details for successive failed tests.
- Assert: Add support for ES6 Map and Set to equiv for
assert.deepEqual()
. - Core: New
QUnit.stack()
method. - Dump: Escape backslash when quoting strings.
- HTML Reporter: Avoid readyState issue with PhantomJS.
- HTML Reporter: HTML reporter enhancements for negative asserts.
- HTML Reporter: Show diff only when it helps.
- Assert: New
assert.notOk()
for asserting falsy values. - Core: Expose Dump
maxDepth
property. - Core: Expose QUnit version as
QUnit.version
property. - Dump: Fix .name/.property doublettes.
- HTML Reporter: New diff using Google's Diff-Patch-Match library.
- HTML Reporter: Make it more obvious why diff is suppressed.
- HTML Reporter: Change display text for bad tests.
- HTML Reporter: Fix checkbox and select handling in IE <9.
- HTML Reporter: Fix test filter without any module.
- HTML Reporter: Retain failed tests numbers.
- HTML Reporter: Fix missing toolbar bug.
- Core: Support Node.js export parity with CommonJS.
- HTML Reporter: Add the filter field.
- HTML Reporter: Don't hide skipped tests.
- HTML Reporter: Fix regression for old markup.
- HTML Reporter: Prevent XSS attacks.
- HTML Reporter: QUnit.url is now a private function in the HTML Reporter.
- HTML Reporter: Url params can be set by code.
- Assert: Add alias for throws called
assert.raises()
. - Assert: New
assert.async()
method. - Core: Add runtime property to
QUnit.moduleDone()
data. - Core: New
QUnit.skip()
method. - Core:
QUnit.test()
now supports returning Promise and async functions. - HTML Reporter: Add runtime of each assertion to result output.
- Core: Change
url()
helper to output?foo
instead of?foo=true
. - Core: Rename config.module to config.moduleFilter.
- Assert: Fail assertions after existing
assert.async()
flows are resolved. - Core: Restore and warn if some logging callback gets modified.
- Core: Throws an error on non-function params for logging methods.
- Core: Defer begin event till tests actually starts.
- Core: Detail modules and tests names in the logging callbacks.
- Core: Use
Error#stack
without throwing when available. - Dump: Configurable limit for object depth.
- Assert: Introduce Assert constructor with test context. This heavily improves debugging of async tests, as assertions can't leak into other tests anymore. Use the new
assert
argument in your test to get the full benefit of this. - Assert: Improve the default message from
assert.ok()
to include the exact received value. - Assert: Removal of deprecated
raises
,same
, andequals
methods. Usethrows
,deepEqual
, andequal
instead. - Core: Add
totalTests
for total number of tests toQUnit.begin()
data. - Dump: Rename
QUnit.jsDump
toQUnit.dump
, the old name is kept as deprecated alias and may be removed later. - Dump: Output non-enumerable properties of TypeError. Makes it easier to compare properties of error objects.
- HTML Reporter: Output only assertion count for green tests. Less visual clutter for passing tests.
- Assert: Support for buggy IE native Error types in
assert.throws()
.
- Addons: Remove last remnants.
- Assert:
assert.throws()
now supports comparing to Error instances. - Assert:
assert.throws()
now supports comparing to error strings. - Core: Add config property for disabling default scroll-to-top.
- Core: Add support for "select one" dropdowns to
QUnit.config.urlConfig
. - Core: Cache window.clearTimeout in case it gets mocked.
- Core: Run multiple tests by test number.
- HTML Reporter: Removing some redundant CSS code.
- Release: Set main property to qunit/qunit.js.
- All: The Grand QUnit Split of 2013. (Timo Tijhof)
- Assert: Remove
raises()
, deprecated in 2012. - Core: Add runtime property to testDone, deprecate duration.
- Core: Only export to the variable that we check for.
- Core: Properly check for existence of document.
- Core: Remove triggerEvent, which isn't used or documented anywhere.
- Core: Silence addEvent in non-browser env.
- HTML Reporter: Use
id
function for selection elements in two places that were not using it. #463 - Release: Add bower.json. #461
- Addons/Canvas: Show how to test with images. #438
- Addons/JUnitLogger: Add a
name
property to the test run. #389 - Addons/PhantomJS: Added optional timeout. Closes #415.
- Addons/PhantomJS: Include stack trace for all failed tests. #416.
- Addons: Move 'addons/canvas' to 'JamesMGreene/qunit-assert-canvas.git'. Tree: https://github.com/JamesMGreene/qunit-assert-canvas/tree/v1.0.0.
- Addons: Move 'addons/close-enough' to 'JamesMGreene/qunit-assert-close.git'. Tree: https://github.com/JamesMGreene/qunit-assert-close/tree/v1.0.0.
- Addons: Move 'addons/composite' to 'jquery/qunit-composite.git'. Tree: https://github.com/jquery/qunit-composite/tree/v1.0.0. #419.
- Addons: Move 'addons/junitlogger' to 'jquery/qunit-reporter-junit.git'.
- Addons: Move 'addons/step' to 'JamesMGreene/qunit-assert-step.git'. Tree: https://github.com/JamesMGreene/qunit-assert-step/tree/v1.0.0.
- Addons: Move 'addons/themes/gabe' to 'Krinkle/qunit-theme-gabe.git'.
- Addons: Move 'addons/themes/ninja' to 'Krinkle/qunit-theme-ninja.git'.
- Addons: Move 'addons/themes/nv' to 'Krinkle/qunit-theme-nv.git'.
- Assert: Message for
assert.ok()
shouldn't be undefined in 'log' event. - Core: Deprecate QUnit.current_testEnvironment in favour of config.current.testEnvironment.
- Core: Emit moduleStart before testStart even if test isn't in a module.
- Core: Fix mismatch between moduleStart and moduleDone events.
- Core: Improve circular reference logic in equiv. #397
- Core: Removed jQuery.trim optimization. #424
- Core: Sort the module names so we no longer rely on implicit ordering. #391, #392
- Core: Use a local setTimeout reference for internal reference to failures if later stubbed. #432, #433.
- HTML Reporter: Clear filter and testNumber when choosing a module. #442
- Addons: New "Ninja" theme.
- Assert: New
assert.propEqual()
andassert.notPropEqual()
. (Timo Tijhof) #317 - HTML Reporter: Capture and show each test's runtime duration. #344
- Addons/Composite: Test suites can be named by including an obj with name & path props within array param for
.testSuites()
. - Addons/PhantomJS: Include source in assertion details.
- Core: Apply the same exception handling for test and teardown try/catch as for setup.
- Addons/Canvas: Use 0.6 as alpha value to avoid inconsistencies between browsers. #342
- Addons/JUnitLogger: Rewrite as it was in bad shape (unused vars, duplicate internal code, sub-optimal XmlWriter logic).
- Addons/PhantomJS: Removed the polling mechanism in favor of PhantomJS 1.6+'s
WebPage#onCallback
. - Assert: Make
throws
ES3 compatible. (Mathias Bynens) - Core: Fix URL generator to take protocol and host into account to fix usage with file protocol in IE7/8.
- Core: Fix issue with Error.prototype.toString in IE 7.
- Core: Improve start()-called-too-often fix, initialize semaphore at 1, fixes autostart=false case. Also provide stack for the offending start() call.
- Core: Push a failing assertion when calling start() while already running. Resets anyway to keep other tests going. #314
- Core: Remove global variable "assert". #341
- Core: There's type-free objects in Firefox, extend objectType() to allow null match. #315
- Dump: Extend jsdump to output Error objects as such, including the message property. Extend throws to provide 'expected' value when possible. #307
- Dump: Include contents of text nodes in
jsDump.node
. (Timo Tijhof) #380 - HTML Reporter: Delay start until
QUnit.init
happened. #358 - HTML Reporter: Change summary text to use the word "assertions" instead of "tests". #336
- HTML Reporter: Fix exception from Diff on property "constructor". #394
- HTML Reporter: Fix module picker for old IE. #366.
- HTML Reporter: Fix urlConfig checkbox event for old IE. #369
- HTML Reporter: Use classes to collapse assertion groups. #269
- All: Simplify licensing to only MIT, no more MIT/GPL dual licensing.
- Assert: Equiv for
assert.deepEqual()
now recognizes the ES6 sticky "y" flag for RegExp objects. #284 - Assert: Make
QUnit.expect()
without arguments behave as a getter. #226 - Core: Add module and test name to the data provided via
QUnit.log()
. #296 - Core: Keep a local reference to Date for internal use. #283
- HTML Reporter: Add a UI for the module filter.
- HTML Reporter: Always display of global errors regardless of filtering URL parameters. #288
- HTML Reporter: Scroll the window back to top after tests finished running. #304
- Assert: Rename
assert.raises()
toassert.throws()
, keeping an alias for compat. #267 - Core: Make the module filter case-insensitive. #252
- HTML Reporter: Link should ignore "testNumber" and "module". #270
- HTML Reporter: Move checkboxes into toolbar and give them labels and tooltip descriptions. #274
- HTML Reporter: Remove use of shadows and change border radius to 5px for pass/error.
- Release: Start publishing to npm under the
qunitjs
package name.
- Assert: Avoid global eval error from
assert.raises()
being reported as global exception in IE. #257 - Core: Reset config.current at the right time. #260
- HTML Reporter: Improve window.onerror handling.
- HTML Reporter: New
module
url parameter. #252
- Addons: Add CLI runner for Phantomjs.
- Assert: Refactor assertion helper functions into a new extensible
QUnit.assert
object, globals remain for compat. - Core: Fix confusion of Date type as Object in
assert.deepEqual()
. #250 - Core: Improve extractStacktrace logic. #254
- Core: Make "Rerun" link only run one test by tracking execution order. #241
- Core: Make filters case-insensitive. #252
- Core: New
config.requireExpects
option. #207 - HTML Reporter: Add Rerun link to placeholders. #240
- Addons/Composite: Double clicking on composite test rows opens individual test page.
- Core: Only check for an
exports
object to detect a CommonJS environment, fixes compat with RequireJS. #237 - HTML Reporter: Prefix test-output id and ignore that in noglobals check. #212
- Core: Add stats results to data. QUnit.jUnitReport function take one argument
{ xml:'<?xml ...', results:{failed:0, passed:0, total:0, time:0} }
. - Core: Call test "block" with config.current.testEnvironment. #217
- Core: Fix clearing of sessionStorage in Firefox 3.6.
- HTML Reporter: Modify "Running..." to display test name. #220
- Core: Add QUnit.pushFailure to log error conditions like exceptions. Accepts stacktrace as second argument, allowing extraction with catched exceptions (useful even in Safari). Remove old
fail()
function that would just log to console, not useful anymore as regular test output is much more useful by now. Move upQUnit.reset()
call to just make that another failed assertion. Used to not make a test fail. #210 - Core: Apply "notrycatch" option to setup and teardown callbacks. #203, #204
- Core: Extend exports object with QUnit properties at the end of the file to export everything.
- Core: Make test fail if no assertions run. #178
- Core: Prefix test-related session-storage items to make removal more specific. #213
- HTML Reporter: Sort objects in value dumps alphabetically to improve diffs. #206
- Addons: New Gabe theme by Gabe Hendry. #188
- Addons: New NV theme by NV. #62
- Addons: New junitlogger addon.
- Core: Catch assertions running outside of
test()
context, make sure source is provided even forok()
. #98 - Core: Check for global object to find setTimeout in Node.js.
- Core: Clear all sessionStorage entries once all tests passed. Helps getting rid of items from renamed tests. #101
- Core: Fix sourceFromsStacktrace to get the right line in Firefox. Shift the 'error' line away in Chrome to get a match.
- Core: Generate more base markup, but allow the user to exclude that completely or choose their own. #127
- Core: In autorun mode, moduleDone is called without matching moduleStart. #184
- Core: Remove the testEnvironmentArg to
test()
. Most obscure, never used anywhere.test()
is still heavily overloaded with argument shifting, this makes it a little more sane. #172 - Core: Replace deprecated same and equals aliases with placeholders that just throw errors, providing a hint at what to use instead. Rename test file to match that.
- Core: Serialize expected and actual values only when test fails to improve testing speed for passing tests. #183
- Core: Update sessionStorage support test to avoid QUOTA_EXCEEDED_EXCEPTION.
- HTML Reporter: Avoid
outerHTML
for Firefox < 11. Use cloneNode instead. - HTML Reporter: Escape
document.title
before inserting into markup. #127 - HTML Reporter: Fix the fixture reset to not break if the element is not present on the page.
- HTML Reporter: Keep label and checkbox together.
- HTML Reporter: Set fixed CSS dimensions on
#qunit-fixture
. #114 - HTML Reporter: Show exception stack when test failed.
- Core: Allow objects with no prototype to tested against object literals.
- Core: Fix IE8 "Member not found" error.
- Core: Export
QUnit.start()
as alias for globalstart()
for use in CommonJS runtimes, such as Node.js.
- Core: Check if setTimeout is available before trying to delay running the next task. #160
- Core: Default 'expected' to null in
asyncTest()
, same as intest()
. - Core: Avoid treating random objects with
length
properties as empty arrays in comparisons. (Trevor Parscal) #164 - Core: Fix IE 6-8 compat with comparisons of NodeList objects. (Trevor Parscal) #166
- Core: Fix a bug where after an async test, assertions could move between test cases because of internal state (config.current) being incorrectly set
- Core: Handle
expect(0)
as expected, i.e.expect(0); ok(true, foo);
will cause a test to fail. (mmchaney) #158 - HTML Reporter: Add a window.onerror handler. Makes uncaught errors actually fail the tests. #134
- HTML Reporter: Avoid internal exception if user extends Object.prototype object with non-standard properties.
First stable release.