f2b9239d82
Adds the initial testing baseline for the project: Unit coverage: - Zod schemas for items, assignments, movements, categories, auth, recipients, users, and assets - password hashing and verification helpers - auth role helper functions Integration coverage with PostgreSQL Testcontainers: - item use-cases: create, duplicate names, delete constraints - assignment use-cases: create, insufficient stock, return, double return - asset use-cases: available/assigned creation and lifecycle transitions - user use-cases: create/update, uniqueness, admin safeguards, password reset - category use-cases: create/update/delete constraints - recipient use-cases: create/update and uniqueness constraints E2E smoke coverage with Playwright: - unauthenticated redirect to login - seeded admin login - dashboard load - admin users page - inventory items page - assignments page Also configures: - Vitest - Playwright - PostgreSQL Testcontainers helpers - deterministic E2E admin bootstrap - test artifact ignores Validation: - bun run test: 9 files / 37 tests passed - bun run test:e2e: 3 passed - bunx tsc --noEmit: passed - bunx prisma validate: passed
83 lines
2.5 KiB
JSON
83 lines
2.5 KiB
JSON
{
|
|
"name": "stock-manager",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"packageManager": "bun@1.3.14",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "next dev --turbopack",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "biome lint --write",
|
|
"format": "biome format --write",
|
|
"check": "biome check --write",
|
|
"test": "bunx vitest run",
|
|
"test:unit": "bunx vitest run tests/unit --passWithNoTests",
|
|
"test:integration": "bun run db:generate && bunx vitest run tests/integration",
|
|
"test:e2e": "bun run db:generate && bunx playwright test",
|
|
"test:coverage": "bunx vitest run --coverage",
|
|
"db:push": "bunx prisma db push",
|
|
"db:migrate": "bunx prisma migrate dev",
|
|
"db:migrate:reset": "bunx prisma migrate reset",
|
|
"db:deploy": "bunx prisma migrate deploy",
|
|
"db:generate": "bunx prisma generate",
|
|
"db:seed": "bunx --bun prisma db seed",
|
|
"db:studio": "bunx prisma studio"
|
|
},
|
|
"dependencies": {
|
|
"@base-ui/react": "^1.4.1",
|
|
"@hookform/resolvers": "^5.2.2",
|
|
"@prisma/adapter-pg": "^7.8.0",
|
|
"@prisma/client": "^7.8.0",
|
|
"@radix-ui/react-checkbox": "^1.3.2",
|
|
"@radix-ui/react-collapsible": "^1.1.11",
|
|
"@radix-ui/react-dialog": "^1.1.14",
|
|
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
"@radix-ui/react-separator": "^1.1.7",
|
|
"@radix-ui/react-slot": "^1.2.3",
|
|
"@radix-ui/react-tooltip": "^1.2.7",
|
|
"@types/papaparse": "^5.3.16",
|
|
"bcryptjs": "^3.0.2",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"dotenv": "^17.4.2",
|
|
"lucide-react": "^1.17.0",
|
|
"next": "^16.2.4",
|
|
"next-auth": "^5.0.0-beta.28",
|
|
"next-themes": "^0.4.6",
|
|
"papaparse": "^5.5.3",
|
|
"radix-ui": "^1.4.3",
|
|
"react": "^19.2.5",
|
|
"react-dom": "^19.2.5",
|
|
"react-hook-form": "^7.74.0",
|
|
"sonner": "^2.0.7",
|
|
"tailwind-merge": "^3.3.1",
|
|
"use-debounce": "^10.0.6",
|
|
"zod": "^4.3.6"
|
|
},
|
|
"devDependencies": {
|
|
"@biomejs/biome": "2.4.15",
|
|
"@playwright/test": "^1.60.0",
|
|
"@tailwindcss/postcss": "^4.1.10",
|
|
"@testcontainers/postgresql": "^12.0.1",
|
|
"@types/node": "^24.0.3",
|
|
"@types/react": "^19.1.8",
|
|
"@types/react-dom": "^19.1.6",
|
|
"@vitest/coverage-v8": "^4.1.8",
|
|
"prisma": "^7.8.0",
|
|
"tailwindcss": "^4.1.10",
|
|
"testcontainers": "^12.0.1",
|
|
"tw-animate-css": "^1.3.4",
|
|
"typescript": "^5.8.3",
|
|
"vitest": "^4.1.8"
|
|
},
|
|
"trustedDependencies": [
|
|
"@prisma/client",
|
|
"@prisma/engines",
|
|
"@tailwindcss/oxide",
|
|
"prisma",
|
|
"sharp",
|
|
"unrs-resolver"
|
|
]
|
|
}
|