MCPcopy Create free account
hub / github.com/adobe/react-spectrum / matchesPattern

Function matchesPattern

scripts/setupTests.js:50–52  ·  view source on GitHub ↗
(message, pattern)

Source from the content-addressed store, hash-verified

48
49// Patterns may be strings (substring match) or regexes.
50function matchesPattern(message, pattern) {
51 return typeof pattern === 'string' ? message.indexOf(pattern) > -1 : pattern.test(message);
52}
53
54function failTestOnConsoleError() {
55 const error = console.error;

Callers 2

failTestOnConsoleErrorFunction · 0.85
failTestOnConsoleWarnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected