Files
toknd_auth/tests/setup.ts
me 4728eaa578
CI / build (push) Successful in 22s
refactor: re-configure env vars and healthcheck (#3)
Co-authored-by: ramvignesh-b <ramvignesh-b@github.com>
Reviewed-on: #3
2026-05-11 19:58:31 +00:00

19 lines
476 B
TypeScript

import { mock } from "bun:test";
// Global test setup to stub environment variables
process.env.API_KEY = "test-api-key";
process.env.REDIS_HOST = "localhost";
process.env.REDIS_PORT = "6379";
process.env.APP_PORT = "3000";
// Global Redis mock
mock.module("../src/core/RedisClient", () => ({
redis: {
status: "ready",
get: mock(() => Promise.resolve(null)),
set: mock(() => Promise.resolve()),
keys: mock(() => Promise.resolve([])),
on: mock(() => {}),
},
}));