( prefix: string, vars: Record<string, string>, )
| 61 | } |
| 62 | |
| 63 | function normalizeEnvWithPrefix( |
| 64 | prefix: string, |
| 65 | vars: Record<string, string>, |
| 66 | ): Record<string, string> { |
| 67 | const normalized: Record<string, string> = {}; |
| 68 | for (const [key, value] of Object.entries(vars ?? {})) { |
| 69 | if (value == null) continue; |
| 70 | const prefixedKey = key.startsWith(prefix) ? key : `${prefix}${key}`; |
| 71 | normalized[prefixedKey] = value; |
| 72 | } |
| 73 | return normalized; |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * Normalizes environment variables by ensuring they are prefixed with TEST_RUNNER_. |
no outgoing calls
no test coverage detected