MCPcopy
hub / github.com/coder/mux / getApiKey

Function getApiKey

tests/testUtils.js:85–94  ·  view source on GitHub ↗

* Get API key from environment or throw if missing (when TEST_INTEGRATION is set)

(keyName)

Source from the content-addressed store, hash-verified

83 * Get API key from environment or throw if missing (when TEST_INTEGRATION is set)
84 */
85function 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

Calls 1

Tested by

no test coverage detected