to have keys

  • <Map> [not] to have keys <array>

Asserts that the keyed collection contains all of the passed-in keys.

const collection = new Map({
  1: 'foo',
  2: 'bar'
});
 
expect(collection, 'to have keys', [ 1, 2 ]);