deepEqual()

A deep recursive comparison, working on primitive types, arrays, objects, regular expressions, dates and functions.

equal()

A non-strict comparison, roughly equivalent to JUnit’s assertEquals.

expect()

Specify how many assertions are expected to run within a test.

QUnit API Documentation

QUnit is a powerful, easy-to-use JavaScript unit test suite. If you're new to QUnit or even just new to unit testing, you might want to check out the Introduction to JavaScript Unit Testing. There's also a QUnit Cookbook on the main site. To get started, use the search at the top of the page, view … Continue reading

notDeepEqual()

An inverted deep recursive comparison, working on primitive types, arrays, objects, regular expressions, dates and functions.

notOk()

A boolean check, inverse of ok() and CommonJS’s assert.ok(), and equivalent to JUnit’s assertFalse(). Passes if the first argument is falsy.

notPropEqual()

A strict comparison of an object’s own properties, checking for inequality.

ok()

A boolean check, equivalent to CommonJS’s assert.ok() and JUnit’s assertTrue(). Passes if the first argument is truthy.

propEqual()

A strict type and value comparison of an object’s own properties.

QUnit.only()

Adds a test to exclusively run, preventing all other tests from running.

QUnit.start()

Description: QUnit.start() must be used to start a test run that has QUnit.config.autostart set to false. This method was previously used to control async tests on text contexts along with QUnit.stop. For asynchronous tests, use assert.async instead. When your async test has multiple exit points, call QUnit.start() for the corresponding number of QUnit.stop() increments. Example: … Continue reading

throws()

Test if a callback throws an exception, and optionally compare the thrown error.