Skip to content

Expectation::toBeFalsy ​

Member of Expectation

idl
Expectation.toBeFalsy, $
  /_expect_failure

Verifies that the expectation value is falsy, which is the opposite of idl toBeTruthy. A value is falsy if it is missing (!null), an empty string, zero, a null pointer or object, or an empty list, hash, orderedhash or dictionary.

Examples ​

idl
(it.expects('')).toBeFalsy
(it.expects(0)).toBeFalsy
(it.expects(!null)).toBeFalsy
(it.expects(list())).toBeFalsy

Keywords ​

_expect_failure {#kw-_expect_failure} ​

optionalinputtype=Boolean

If the test fails for some reason, set this to force passing because we expected failure. This keyword is for internal use only.

Licensed under MIT.