* Get API key from environment or throw if missing (when TEST_INTEGRATION is set)
(keyName)
| 83 | * Get API key from environment or throw if missing (when TEST_INTEGRATION is set) |
| 84 | */ |
| 85 | function getApiKey(keyName) { |
| 86 | if (!shouldRunIntegrationTests()) { |
| 87 | throw new Error("getApiKey should only be called when TEST_INTEGRATION is set"); |
| 88 | } |
| 89 | const value = process.env[keyName]; |
| 90 | if (!value) { |
| 91 | throw new Error(`Environment variable ${keyName} is required for integration tests`); |
| 92 | } |
| 93 | return value; |
| 94 | } |
| 95 | //# sourceMappingURL=testUtils.js.map |
no test coverage detected