Expectation::toHaveUniqueValues
Member of Expectation
idl
Expectation.toHaveUniqueValues, $
/_expect_failureVerifies that the expectation value (an array or list) has no duplicate items. Items are compared as described for idl toContainEqual, and strings are case sensitive.
Examples
idl
(it.expects([1, 2, 3])).toHaveUniqueValues
(it.expects(['a', 'A'])).toHaveUniqueValues
(it.expects([1, 2, 2]))._not_.toHaveUniqueValuesKeywords
_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.