Skip to content

Expectation::toContainString ​

Member of Expectation

idl
Expectation.toContainString, compare, $
  /_expect_failure

Verifies that an expectation value contains a sub string.

Examples ​

idl
(it.expects('the answer is 42')).toContainString, '42'
(it.expects('the answer is 42'))._not_.toContainString, 'question'

Arguments ​

compare ​

requiredinputtype=String

Specify a string to find in the expectation value.

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.