method
test.Matchers.toContain
expected: T extends Iterable<U, any, any> ? U : T
): void;
Asserts that a value contains what is expected.
The value must be an array or iterable, which includes strings.
@param expected
the expected value
expect([1, 2, 3]).toContain(1);
expect(new Set([true])).toContain(true);
expect("hello").toContain("o");