MCPcopy
hub / github.com/Agenta-AI/agenta / getTestmailClient

Function getTestmailClient

web/tests/utils/testmail/index.ts:97–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95let defaultClient: TestmailClient | null = null
96
97export function getTestmailClient(): TestmailClient {
98 if (!defaultClient) {
99 const apiKey = process.env.TESTMAIL_API_KEY
100 const namespace = process.env.TESTMAIL_NAMESPACE
101
102 if (!apiKey || !namespace) {
103 throw new Error(
104 "TESTMAIL_API_KEY and TESTMAIL_NAMESPACE environment variables are required",
105 )
106 }
107
108 defaultClient = new TestmailClient({apiKey, namespace})
109 }
110 return defaultClient
111}
112
113export type {Testmail}

Callers 3

globalSetupFunction · 0.90
authHelpersFunction · 0.90
createInitialUserStateFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected