A simple state checking assertion... |
ok( state, message ); |
Parameter | Type | Mandatory | Notes | API Version |
---|---|---|---|---|
state | Boolean | ![]() | If state typecasts to true , the assertion passes, otherwise it fails. | 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 | The assertion passed. | 1.0 |
false | Boolean | The assertion failed. | 1.0 |
Test("Is chat() defined?", Test.ANY( ), function() { // assertion will fail on WZ 3.1 branch ok( _global.hasOwnProperty("chat"), "chat() defined" ); }); |