MCPcopy Create free account
hub / github.com/bytebase/bytebase / loadTestEnv

Function loadTestEnv

frontend/tests/e2e/framework/env.ts:24–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22}
23
24export function loadTestEnv(): TestEnv & { api: BytebaseApiClient } {
25 if (!fs.existsSync(ENV_FILE)) {
26 throw new Error(
27 ".e2e-env.json not found. Run the setup project first (npx playwright test)."
28 );
29 }
30 const raw = JSON.parse(fs.readFileSync(ENV_FILE, "utf-8")) as TestEnv;
31 const api = new BytebaseApiClient({
32 baseURL: raw.baseURL,
33 credentials: { email: raw.adminEmail, password: raw.adminPassword },
34 });
35 return { ...raw, api };
36}
37
38export function cleanupEnvFile(): void {
39 if (fs.existsSync(ENV_FILE)) fs.unlinkSync(ENV_FILE);

Calls

no outgoing calls

Tested by

no test coverage detected