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

Function getTestPaths

packages/jest-core/src/__tests__/SearchSource.test.ts:110–127  ·  view source on GitHub ↗
(
      initialOptions: Config.InitialOptions,
      filter?: Filter,
    )

Source from the content-addressed store, hash-verified

108
109 describe('getTestPaths', () => {
110 const getTestPaths = async (
111 initialOptions: Config.InitialOptions,
112 filter?: Filter,
113 ) => {
114 const {searchSource, config} = await initSearchSource(initialOptions);
115 const allConfig = {
116 ...config,
117 ...initialOptions,
118 testPathPatterns: new TestPathPatterns([]),
119 };
120 const {tests: paths} = await searchSource.getTestPaths(
121 allConfig,
122 allConfig,
123 null,
124 filter,
125 );
126 return paths.map(({path: p}) => path.relative(rootDir, p)).sort();
127 };
128
129 it('finds tests matching a pattern via testRegex', async () => {
130 const paths = await getTestPaths({

Callers 1

Calls 3

initSearchSourceFunction · 0.85
getTestPathsMethod · 0.80
sortMethod · 0.45

Tested by

no test coverage detected