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

Function run

packages/jest-circus/src/run.ts:33–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31const testNameStorage = new AsyncLocalStorage<string>();
32
33const run = async (): Promise<Circus.RunResult> => {
34 const {rootDescribeBlock, seed, randomize} = getState();
35 jestExpect.setState({
36 currentConcurrentTestName: () => testNameStorage.getStore(),
37 });
38 const rng = randomize ? rngBuilder(seed) : undefined;
39 await dispatch({name: 'run_start'});
40 await _runTestsForDescribeBlock(rootDescribeBlock, rng);
41 await dispatch({name: 'run_finish'});
42 return makeRunResult(
43 getState().rootDescribeBlock,
44 getState().unhandledErrors,
45 );
46};
47
48function* regroupConcurrentChildren(
49 children: Array<Circus.DescribeBlock | Circus.TestEntry>,

Callers 1

Calls 6

getStateFunction · 0.90
rngBuilderFunction · 0.90
dispatchFunction · 0.90
makeRunResultFunction · 0.90
setStateMethod · 0.65

Tested by

no test coverage detected