logsPropTypeWarning function
Matcher used to check for a specific propType
warning being emitted during
the runtime of a callback function.
Has the same underlying logic as hasLog, with the difference being that the
console configuration is set to errorConfig
and non-propType
related warnings
are filtered out of the list.
In the case the actual value is a callback that is run, any errors caused by
the callback will be caught. Because the console configuration
is set to errorConfig
, the actual list of logs will include the error
message from the caught error.
Related: logsPropTypeWarnings, logsNoPropTypeWarnings, hasLog
Implementation
_PropTypeLogMatcher logsPropTypeWarning(String expected) =>
_PropTypeLogMatcher(anyElement(contains(expected)));