({
config,
suite,
testNamePattern,
testPath,
}: {
config: Config.ProjectConfig;
suite: SuiteLike;
testNamePattern: string | undefined;
testPath: string;
})
| 79 | }; |
| 80 | |
| 81 | export 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 | |
| 105 | export default async function jasmine2( |
| 106 | globalConfig: Config.GlobalConfig, |
no test coverage detected