method
test.MatchersBuiltin.toContainAnyKeys
expected: IfNeverThenElse<keyof T, PropertyKey>[]
): void;
Asserts that an object contains at least one of the provided keys.
The value must be an object.
@param expected
the expected value
expect({ a: 'hello', b: 'world' }).toContainAnyKeys(['a']);
expect({ a: 'hello', b: 'world' }).toContainAnyKeys(['b']);
expect({ a: 'hello', b: 'world' }).toContainAnyKeys(['b', 'c']);
expect({ a: 'hello', b: 'world' }).not.toContainAnyKeys(['c']);