test: add Vitest infrastructure (config, setup, mocks, fixtures)
Adds test harness for the suite: - vitest.config.ts: happy-dom env, @/* alias, v8 coverage with 70% thresholds - setup.ts: env vars, global next/headers and next/navigation mocks - tsconfig.json: IDE alias resolution for test/ - __mocks__/prisma.ts: centralised Prisma mock auto-registered via vi.mock - fixtures/users.ts, fixtures/orders.ts: typed test data
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "../app/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["../app/src/*"]
|
||||
},
|
||||
"types": ["vitest/globals", "@testing-library/jest-dom"]
|
||||
},
|
||||
"include": [
|
||||
"./**/*.ts",
|
||||
"./**/*.tsx"
|
||||
],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user