added api logic, vitest, minimal testing ui
This commit is contained in:
8
api/tests/appFactory.ts
Normal file
8
api/tests/appFactory.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user