MCPcopy Create free account
hub / github.com/firebase/firebase-tools / toTestCaseInvocation

Function toTestCaseInvocation

src/apptesting/parseTestFiles.ts:143–162  ·  view source on GitHub ↗
(
  testDef: any,
  targetUri: any,
  defaultConfig: any,
)

Source from the content-addressed store, hash-verified

141}
142
143function toTestCaseInvocation(
144 testDef: any,
145 targetUri: any,
146 defaultConfig: any,
147): TestCaseInvocation {
148 const steps = testDef.steps ?? [];
149 const route = testDef.testConfig?.route ?? defaultConfig?.route ?? "";
150 const browsers: Browser[] = testDef.testConfig?.browsers ??
151 defaultConfig?.browsers ?? [Browser.CHROME];
152 return {
153 testCase: {
154 id: testDef.id,
155 prerequisiteTestCaseId: testDef.prerequisiteTestCaseId,
156 startUri: targetUri + route,
157 displayName: testDef.displayName,
158 steps: steps.map((step: YamlStep) => fromYamlStep(step)),
159 },
160 testExecution: browsers.map((browser) => ({ config: { browser } })),
161 };
162}

Callers 1

parseTestFilesRecursiveFunction · 0.85

Calls 1

fromYamlStepFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…