Files
aniplay-api/src/libs/test/getTestEnv.ts
Rushil Perera 8175d73df1 refactor: ♻️emoves Env parameter
Removes the `Env` parameter from several functions to simplify their signatures and rely on the global `env` for configuration.

This change reduces the number of arguments passed around, making the code cleaner and easier to maintain.
2025-08-10 19:22:14 -04:00

19 lines
555 B
TypeScript

/** Should only be used when it doesn't make sense for 'Bindings' or 'Variables' to be set. Otherwise, use getTestEnv(). */
export function getTestEnvVariables(): Cloudflare.Env {
return getTestEnv();
}
export function getTestEnv({
ADMIN_SDK_JSON = '{"client_email": "test@test.com", "project_id": "test-26g38"}',
ENABLE_ANIFY = "true",
TURSO_AUTH_TOKEN = "123",
TURSO_URL = "http://127.0.0.1:3001",
}: Partial<Cloudflare.Env> = {}): Cloudflare.Env {
return {
ADMIN_SDK_JSON,
ENABLE_ANIFY,
TURSO_AUTH_TOKEN,
TURSO_URL,
};
}