MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / resolveTarget

Function resolveTarget

e2e/targets/registry.ts:38–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36let current: Target | undefined;
37
38export const resolveTarget = (): Target => {
39 if (current) return current;
40 const name = process.env.E2E_TARGET;
41 const factory = name ? factories[name] : undefined;
42 if (!factory) {
43 throw new Error(
44 `E2E_TARGET=${JSON.stringify(name)} — expected one of: ${Object.keys(factories).join(", ")}. ` +
45 `Run via the vitest projects (e.g. \`vitest run --project cloud\`).`,
46 );
47 }
48 current = factory();
49 return current;
50};

Callers 2

scenarioFunction · 0.90
loadTargetFunction · 0.85

Calls 1

factoryFunction · 0.85

Tested by

no test coverage detected