Bool asserter.
Assert that the type of actual
value is a boolean
(using .isBool()
assertion).
The bool()
asserter provides adapted assertions for works on a boolean
.
See also the spec of "bool" asserter for more examples.
See also
Example
test.bool(actual);
Methods
-
isTrue()
-
Assert that the
actual
value istrue
.ReturnsType Description ObjectThe current instance
test.bool(true).isTrue();
See also -
isNotTrue()
-
Assert that the
actual
value is nottrue
.ReturnsType Description ObjectThe current instance
test .bool(false) .isNotTrue() .bool(1) .isNotTrue() .bool('1') .isNotTrue() .bool('true') .isNotTrue() ;
See also -
isFalse()
-
Assert that the
actual
value isfalse
.ReturnsType Description ObjectThe current instance
test.bool(false).isFalse();
See also -
isNotFalse()
-
Assert that the
actual
value is notfalse
.ReturnsType Description ObjectThe current instance
test .bool(true) .isNotFalse() .bool(0) .isNotFalse() .bool('0') .isNotFalse() .bool('false') .isNotFalse() .bool(null) .isNotFalse() .bool(undefined) .isNotFalse() ;
See also