toContainAnyValues

Bun

Symbol

Matchers.toContainAnyValues

toContainAnyValues(expected: unknown): void

Asserts that an object contain any provided value.

The value must be an object

@param expected

the expected value

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