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

Method matchFilesWithGlob

packages/jest-haste-map/src/HasteFS.ts:80–91  ·  view source on GitHub ↗
(globs: Array<string>, root: string | null)

Source from the content-addressed store, hash-verified

78 }
79
80 matchFilesWithGlob(globs: Array<string>, root: string | null): Set<string> {
81 const files = new Set<string>();
82 const matcher = globsToMatcher(globs);
83
84 for (const file of this.getAbsoluteFileIterator()) {
85 const filePath = root ? fastPath.relative(root, file) : file;
86 if (matcher(replacePathSepForGlob(filePath))) {
87 files.add(file);
88 }
89 }
90 return files;
91 }
92
93 private _getFileData(file: string) {
94 const relativePath = fastPath.relative(this._rootDir, file);

Callers

nothing calls this directly

Calls 4

globsToMatcherFunction · 0.90
replacePathSepForGlobFunction · 0.90
addMethod · 0.45

Tested by

no test coverage detected