test(integration): add real-stack integration test suite with PGlite
- PGlite (in-memory WASM Postgres) hosted in a child process, exposed via TCP socket; real migrations applied with prisma migrate deploy - Vitest harness (vitest.integration.config.ts, global-setup spawns PGlite + built Nuxt server, per-test TRUNCATE, factories, cookie-jar API client); no mocks, zero production code changes - 50 tests across auth, hunt, team, submit, review, showcase, diashow incl. SuperJSON envelope check; *.itest.ts keeps bun test untouched - CI: parallel unit + integration jobs in .github/workflows/test.yml - tests/ covered by nuxt typecheck via tests/tsconfig.json reference
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
"format": "prettier --write .",
|
||||
"check": "prettier --check .",
|
||||
"test": "bun test",
|
||||
"test:integration": "vitest run -c vitest.integration.config.ts",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"typecheck": "nuxt typecheck",
|
||||
@@ -46,12 +47,15 @@
|
||||
"zod": "^4.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electric-sql/pglite": "^0.5.5",
|
||||
"@electric-sql/pglite-socket": "^0.2.8",
|
||||
"@nuxt/devtools": "^2.6.4",
|
||||
"@types/bun": "^1.2.20",
|
||||
"prettier": "^3.6.2",
|
||||
"prettier-plugin-organize-imports": "^4.2.0",
|
||||
"prettier-plugin-tailwindcss": "^0.6.14",
|
||||
"prisma": "^6.16.1",
|
||||
"vitest": "^4.1.10",
|
||||
"vue-tsc": "^3.0.6"
|
||||
},
|
||||
"patchedDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user