()
| 36 | let current: Target | undefined; |
| 37 | |
| 38 | export 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 | }; |
no test coverage detected