The notDeepEqual() is a built-in function of Qunitjs test suite which validates the strict comparison, 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; otherwise, it fails. When it fails, both actual and expected values are displayed in the test result, in addition to a given message.
Syntax:
1 | notStrictEqual( actual, expected [, message ] ) |
1 2 3 4 | QUnit.test( "a test", function( assert ) { assert.notStrictEqual( 1, "1", "String '1' and number 1 have the same value but not the same type" ); }); |
Reference: https://api.qunitjs.com/assert/notStrictEqual
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.