toContainValues

Bun

Symbol

Matchers.toContainValues

toContainValues(expected: unknown): void

Asserts that an object contain the provided value.

The value must be an object

@param expected

the expected value

const o = { a: 'foo', b: 'bar', c: 'baz' };
expect(o).toContainValues(['foo']);
expect(o).toContainValues(['baz', 'bar']);
expect(o).not.toContainValues(['qux', 'foo']);