Asserts that an object contains all the provided keys.
The value must be an object
method
Asserts that an object contains all the provided keys.
The value must be an object
the expected value
expect({ a: 'hello', b: 'world' }).toContainAllKeys(['a','b']);
expect({ a: 'hello', b: 'world' }).toContainAllKeys(['b','a']);
expect({ 1: 'hello', b: 'world' }).toContainAllKeys([1,'b']);
expect({ a: 'hello', b: 'world' }).not.toContainAllKeys(['c']);
expect({ a: 'hello', b: 'world' }).not.toContainAllKeys(['a']);