A strict equality checking assertion... |
strictEqual( actual, expected, message ); |
Parameter | Type | Mandatory | Notes | API Version |
---|---|---|---|---|
actual | Variant | The actual value. | 1.0 | |
expected | Variant | The expected value. | 1.0 | |
message | String | A message stating what the assertion is testing. | 1.0 |
Value | Type | Notes | API Version |
---|---|---|---|
<error> | Error | Most likely the parameters are wrong. | 1.0 |
true | Boolean | expected === actual. | 1.0 |
false | Boolean | expected !== actual. | 1.0 |
Test("Equality checks", Test.ANY( ), function() { // assertion will pass strictEqual( true, true, "true === true?" ); // assertions will fail strictEqual( undefined, null, "undefined === null?" ); strictEqual( null, false, "null === false?" ); strictEqual( "fish", true, "'fish' === true?" ); strictEqual( true, false, "true === false?" ); }); |