Expectation::toBeAnArrayOf
Member of Expectation
idl
Expectation.toBeAnArrayOf, type, $
/_expect_failureVerifies that the expectation value is an array whose type matches the type specified. Accepts the same type names as idl toBeA.
Examples
idl
(it.expects(['a', 'b'])).toBeAnArrayOf, 'string'
(it.expects([1, 2, 3])).toBeAnArrayOf, 'number'
(it.expects('a'))._not_.toBeAnArrayOf, 'string'Arguments
type
requiredinputtype=StringSpecify the type that the array should have.
Keywords
_expect_failure {#kw-_expect_failure}
optionalinputtype=BooleanIf the test fails for some reason, set this to force passing because we expected failure. This keyword is for internal use only.