import { beforeAll } from "bun:test";
import { setupLogging } from "../src/logtape";

await setupLogging();

process.env.PGDATABASE = "kyoo_test";
process.env.JWT_SECRET = "this is a secret";
process.env.JWT_ISSUER = "https://kyoo.zoriya.dev";
process.env.IMAGES_PATH = "./images";

beforeAll(async () => {
	// lazy load this so env set before actually applies
	const { migrate } = await import("~/db");
	await migrate();
});
