Files
SkyMoney/api/tests/appFactory.ts

8 lines
329 B
TypeScript

import type { FastifyInstance } from "fastify";
export default async function appFactory(): Promise<FastifyInstance> {
// env is already set in tests/setup.ts, so now we can import
const { default: app } = await import("../src/server"); // ESM + TLA safe
await app.ready(); // ensure all plugins registered
return app;
}