test(ai-character): 리소스 운영 E2E 보강

This commit is contained in:
Yu Sung
2026-08-01 01:30:52 +09:00
parent 3faca90135
commit 3759abf8b7
16 changed files with 1962 additions and 62 deletions

17
tests/e2e/api-base-url.ts Normal file
View File

@@ -0,0 +1,17 @@
/// <reference types="node" />
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
function readDevelopmentApiBaseUrl(): string {
const envFile = readFileSync(resolve(process.cwd(), ".env.development"), "utf8");
const line = envFile.split("\n").find((entry) => entry.startsWith("VITE_API_BASE_URL="));
if (line === undefined) {
throw new Error("VITE_API_BASE_URL is missing from .env.development");
}
return line.slice("VITE_API_BASE_URL=".length).trim();
}
export const apiBaseUrl = process.env.VITE_API_BASE_URL ?? readDevelopmentApiBaseUrl();