MCPcopy Index your code
hub / github.com/nodejs/node / testMatchesPattern

Function testMatchesPattern

lib/internal/test_runner/test.js:173–184  ·  view source on GitHub ↗
(test, patterns)

Source from the content-addressed store, hash-verified

171}
172
173function testMatchesPattern(test, patterns) {
174 const matchesByNameOrParent = ArrayPrototypeSome(patterns, (re) =>
175 RegExpPrototypeExec(re, test.name) !== null,
176 ) || (test.parent && testMatchesPattern(test.parent, patterns));
177 if (matchesByNameOrParent) return true;
178
179 const testNameWithAncestors = StringPrototypeTrim(test.getTestNameWithAncestors());
180
181 return ArrayPrototypeSome(patterns, (re) =>
182 RegExpPrototypeExec(re, testNameWithAncestors) !== null,
183 );
184}
185
186class TestPlan {
187 #waitIndefinitely = false;

Callers 1

willBeFilteredByNameMethod · 0.85

Calls 1

Tested by

no test coverage detected