MCPcopy
hub / github.com/jestjs/jest / isValid

Method isValid

packages/jest-pattern/src/TestPathPatterns.ts:24–30  ·  view source on GitHub ↗

* Return true if the patterns are valid.

()

Source from the content-addressed store, hash-verified

22 * Return true if the patterns are valid.
23 */
24 isValid(): boolean {
25 return this.toExecutor({
26 // isValid() doesn't require rootDir to be accurate, so just
27 // specify a dummy rootDir here
28 rootDir: '/',
29 }).isValid();
30 }
31
32 /**
33 * Return a human-friendly version of the pattern regex.

Callers 1

buildTestPathPatternsFunction · 0.95

Calls 2

toExecutorMethod · 0.95
isValidMethod · 0.65

Tested by

no test coverage detected