- Install Vitest, @testing-library/react, @testing-library/user-event,
@testing-library/jest-dom, jsdom, @vitest/coverage-v8
- Add vitest.config.ts with jsdom environment and v8 coverage
- Add src/test/setup.ts with jest-dom matchers
- Write 5 component tests and 3 integration tests for LoginPage:
renders, form-fields, button-state, error-alert, loading-state,
submit-success, submit-error-response, submit-network-error
- 31 tests pass; 92%+ stmt/branch coverage on page.tsx
- Add test-web CI job to .gitea/workflows/ci.yml
Co-Authored-By: Paperclip <[email protected]>
41 lines
1007 B
JSON
41 lines
1007 B
JSON
{
|
|
"name": "@errors-bitreport/web",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev -p 3201",
|
|
"build": "next build",
|
|
"start": "next start -p 3201",
|
|
"lint": "next lint",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage"
|
|
},
|
|
"dependencies": {
|
|
"axios": "^1.7.2",
|
|
"next": "15.5.15",
|
|
"react": "19.2.5",
|
|
"react-dom": "19.2.5"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/eslintrc": "^3.2.0",
|
|
"@testing-library/jest-dom": "^6.9.1",
|
|
"@testing-library/react": "^16.3.2",
|
|
"@testing-library/user-event": "^14.6.1",
|
|
"@types/node": "^22.9.0",
|
|
"@types/react": "19.2.14",
|
|
"@types/react-dom": "19.2.3",
|
|
"@vitejs/plugin-react": "^6.0.1",
|
|
"@vitest/coverage-v8": "^4.1.5",
|
|
"eslint": "^9.15.0",
|
|
"eslint-config-next": "15.5.15",
|
|
"jsdom": "^29.0.2",
|
|
"typescript": "^5.6.3",
|
|
"vitest": "^4.1.5"
|
|
},
|
|
"engines": {
|
|
"node": ">=20"
|
|
}
|
|
}
|