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

Function buildCollectedTestResult

packages/jest-jasmine2/src/index.ts:81–103  ·  view source on GitHub ↗
({
  config,
  suite,
  testNamePattern,
  testPath,
}: {
  config: Config.ProjectConfig;
  suite: SuiteLike;
  testNamePattern: string | undefined;
  testPath: string;
})

Source from the content-addressed store, hash-verified

79};
80
81export const buildCollectedTestResult = ({
82 config,
83 suite,
84 testNamePattern,
85 testPath,
86}: {
87 config: Config.ProjectConfig;
88 suite: SuiteLike;
89 testNamePattern: string | undefined;
90 testPath: string;
91}): TestResult => {
92 const testNamePatternRE = testNamePattern
93 ? new RegExp(testNamePattern, 'i')
94 : null;
95 const assertionResults = collectSpecs(suite, [], testNamePatternRE);
96 return {
97 ...createEmptyTestResult(),
98 displayName: config.displayName,
99 numPendingTests: assertionResults.length,
100 testFilePath: testPath,
101 testResults: assertionResults,
102 };
103};
104
105export default async function jasmine2(
106 globalConfig: Config.GlobalConfig,

Callers 2

jasmine2Function · 0.85

Calls 2

createEmptyTestResultFunction · 0.90
collectSpecsFunction · 0.85

Tested by

no test coverage detected