A deep recursive comparison assertion, working on primitive types, arrays, objects, regular expressions, dates and functions.
The deepEqual() assertion can be used just like equal() when comparing the value of objects, such that { key: value } is equal to { key: value }. For non-scalar values, identity will be disregarded by deepEqual.
Object or Expression being tested
Known comparison value
A short description of the assertion
any
A non-strict comparison assertion, roughly equivalent to JUnit assertEquals.
The equal assertion uses the simple comparison operator (==) to compare the actual and expected arguments. When they are equal, the assertion passes: any; otherwise, it fails. When it fails, both actual and expected values are displayed in the test result, in addition to a given message.
Expression being tested
Known comparison value
A short description of the assertion
any
An inverted deep recursive comparison assertion, working on primitive types, arrays, objects, regular expressions, dates and functions.
The notDeepEqual() assertion can be used just like equal() when comparing the value of objects, such that { key: value } is equal to { key: value }. For non-scalar values, identity will be disregarded by notDeepEqual.
Object or Expression being tested
Known comparison value
A short description of the assertion
any
A non-strict comparison assertion, checking for inequality.
The notEqual assertion uses the simple inverted comparison operator (!=) to compare the actual and expected arguments. When they aren't equal, the assertion passes: any; otherwise, it fails. When it fails, both actual and expected values are displayed in the test result, in addition to a given message.
Expression being tested
Known comparison value
A short description of the assertion
any
any
A non-strict comparison assertion, checking for inequality.
The notStrictEqual assertion uses the strict inverted comparison operator (!==) to compare the actual and expected arguments. When they aren't equal, the assertion passes: any; otherwise, it fails. When it fails, both actual and expected values are displayed in the test result, in addition to a given message.
Expression being tested
Known comparison value
A short description of the assertion
any
A boolean assertion, equivalent to CommonJS’s assert.ok() and JUnit’s assertTrue(). Passes if the first argument is truthy.
The most basic assertion in QUnit, ok() requires just one argument. If the argument evaluates to true, the assertion passes; otherwise, it fails. If a second message argument is provided, it will be displayed in place of the result.
Expression being tested
A short description of the assertion
any
any
A strict type and value comparison assertion.
The strictEqual() assertion provides the most rigid comparison of type and value with the strict equality operator (===)
Expression being tested
Known comparison value
A short description of the assertion
any
Assertion to test if a callback throws an exception when run.
When testing code that is expected to throw an exception based on a specific set of circumstances, use throws() to catch the error object for testing and comparison.
Function to execute
Error Object to compare
A short description of the assertion
any
Function to execute
A short description of the assertion
any