method
test.MatchersBuiltin.toBeOneOf
expected: Iterable<T>
): void;
Asserts that the value is deeply equal to an element in the expected array.
The value must be an array or iterable, which includes strings.
@param expected
the expected value
expect(1).toBeOneOf([1,2,3]);
expect("foo").toBeOneOf(["foo", "bar"]);
expect(true).toBeOneOf(new Set([true]));