Sets up Vitest (jsdom, Testing Library, v8 coverage) per the Next 16 testing guide, using Vite's native tsconfig path resolution instead of vite-tsconfig-paths. A server-only stub and a temp-data helper let server modules run in isolation. @types/node moves to ^24 to match the Node 24 runtime (a vitest 5 peer requirement). First 68 tests cover the discover route (including iss-dbwgww8: no raw errors in responses), the credential store, the camera registry, camera-route helpers and the refresh-rate schema. Line coverage is 31.2%, toward the 95% goal. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
40 lines
946 B
JSON
40 lines
946 B
JSON
{
|
|
"name": "cameras",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "eslint",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"coverage": "vitest run --coverage"
|
|
},
|
|
"dependencies": {
|
|
"@tanstack/react-query": "^5.103.1",
|
|
"next": "16.3.5",
|
|
"onvif": "^0.8.3",
|
|
"react": "19.2.8",
|
|
"react-dom": "19.2.8",
|
|
"server-only": "^0.0.1",
|
|
"zod": "^4.6.5"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/postcss": "^4",
|
|
"@testing-library/dom": "^10.4.2",
|
|
"@testing-library/react": "^16.3.3",
|
|
"@types/node": "^24.13.6",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"@vitejs/plugin-react": "^6.1.1",
|
|
"@vitest/coverage-v8": "^5.0.1",
|
|
"eslint": "^9",
|
|
"eslint-config-next": "16.3.5",
|
|
"jsdom": "^29.1.1",
|
|
"tailwindcss": "^4",
|
|
"typescript": "^5",
|
|
"vitest": "^5.0.1"
|
|
}
|
|
}
|