hasProp function

Matcher hasProp(
  1. dynamic propKey,
  2. dynamic propValue
)

Returns a matcher that matches Dart, JS composite, and DOM ReactElements and ReactComponents that contain the prop pair (propKey, propValue).

Since props of DOM ReactComponents cannot be read directly, the element's attributes are matched instead.

This matcher will always fail when unsupported prop keys are tested against a DOM ReactComponent.

TODO: add support for prop keys that aren't the same as their attribute keys

Implementation

Matcher hasProp(dynamic propKey, dynamic propValue) => _HasPropMatcher(propKey, propValue);