containsKey method

void containsKey(
  1. K key
)

Expects that the map contains key according to Map.containsKey.

Implementation

void containsKey(K key) {
  context.expect(() => prefixFirst('contains key ', literal(key)), (actual) {
    if (actual.containsKey(key)) return null;
    return Rejection(
        which: prefixFirst('does not contain key ', literal(key)));
  });
}