Skip to content

Expectation::toBeAnArrayOf ​

Member of Expectation

idl
Expectation.toBeAnArrayOf, type, $
  /_expect_failure

Verifies 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=String

Specify the type that the array should have.

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.