version added: 1.0.0
strictEqual( actual, expected, message = "" )
A strict type and value comparison.
| name | description |
|---|---|
actual | Expression being tested |
expected | Known comparison value |
message (string) | Short description of the actual expression |
The strictEqual() assertion provides the most rigid comparison of type and value with the strict equality operator (===).
assert.equal() can be used to test non-strict equality.
assert.notStrictEqual() can be used to explicitly test strict inequality.
assert.same().Compare the value of two primitives, having the same value and type.
QUnit.test('strictEqual example', assert => {
const result = 2;
assert.strictEqual(result, 2);
});
© OpenJS Foundation and contributors.
Licensed under the MIT license.
https://api.qunitjs.com/assert/strictEqual