contains function

Matcher contains (dynamic expected)

Returns a matcher that matches if the match argument contains the expected value.

For Strings this means substring matching; for Maps it means the map has the key, and for Iterables it means the iterable has a matching element. In the case of iterables, expected can itself be a matcher.

Implementation

Matcher contains(expected) => new _Contains(expected);