Asserts that an object
contains a key.
The value must be an object
Symbol
Asserts that an object
contains a key.
The value must be an object
the expected value
expect({ a: 'foo', b: 'bar', c: 'baz' }).toContainKey('a');
expect({ a: 'foo', b: 'bar', c: 'baz' }).toContainKey('b');
expect({ a: 'foo', b: 'bar', c: 'baz' }).toContainKey('c');
expect({ a: 'foo', b: 'bar', c: 'baz' }).not.toContainKey('d');