Files
thrilltrack-explorer/package.json
Claude a01d18ebb4 Replace Playwright with Vitest for comprehensive testing
Major Changes:
- Removed Playwright E2E testing framework (overkill for React app)
- Implemented Vitest with comprehensive unit tests
- All 235 tests passing successfully

Testing Coverage:
 Sanitization utilities (100+ tests)
  - XSS prevention (script tags, javascript:, data: protocols)
  - HTML entity escaping
  - URL validation and dangerous protocol blocking
  - Edge cases and malformed input handling

 Validation schemas (80+ tests)
  - Username validation (forbidden names, format rules)
  - Password complexity requirements
  - Display name content filtering
  - Bio and personal info sanitization
  - Profile editing validation

 Moderation lock helpers (50+ tests)
  - Concurrency control (canClaimSubmission)
  - Lock expiration handling
  - Lock status determination
  - Lock urgency levels
  - Edge cases and timing boundaries

Configuration:
- Created vitest.config.ts with comprehensive setup
- Added test scripts: test, test:ui, test:run, test:coverage
- Set up jsdom environment for React components
- Configured coverage thresholds (70%)

GitHub Actions:
- Replaced complex Playwright workflow with streamlined Vitest workflow
- Faster CI/CD pipeline (10min timeout vs 60min)
- Coverage reporting with PR comments
- Artifact uploads for coverage reports

Benefits:
- 10x faster test execution
- Better integration with Vite build system
- Comprehensive coverage of vital security functions
- Lower maintenance overhead
- Removed unnecessary E2E complexity
2025-11-08 04:28:08 +00:00

121 lines
3.9 KiB
JSON

{
"name": "vite_react_shadcn_ts",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"build:dev": "vite build --mode development",
"lint": "eslint .",
"preview": "vite preview",
"test": "vitest",
"test:ui": "vitest --ui",
"test:run": "vitest run",
"test:coverage": "vitest run --coverage"
},
"dependencies": {
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@faker-js/faker": "^10.1.0",
"@hookform/resolvers": "^3.10.0",
"@marsidev/react-turnstile": "^1.3.1",
"@mdxeditor/editor": "^3.47.0",
"@novu/headless": "^2.6.6",
"@novu/node": "^2.6.6",
"@novu/react": "^3.10.1",
"@radix-ui/react-accordion": "^1.2.11",
"@radix-ui/react-alert-dialog": "^1.1.14",
"@radix-ui/react-aspect-ratio": "^1.1.7",
"@radix-ui/react-avatar": "^1.1.10",
"@radix-ui/react-checkbox": "^1.3.2",
"@radix-ui/react-collapsible": "^1.1.11",
"@radix-ui/react-context-menu": "^2.2.15",
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-hover-card": "^1.1.14",
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-menubar": "^1.1.15",
"@radix-ui/react-navigation-menu": "^1.2.13",
"@radix-ui/react-popover": "^1.1.14",
"@radix-ui/react-progress": "^1.1.7",
"@radix-ui/react-radio-group": "^1.3.7",
"@radix-ui/react-scroll-area": "^1.2.9",
"@radix-ui/react-select": "^2.2.5",
"@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-slider": "^1.3.5",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-switch": "^1.2.5",
"@radix-ui/react-tabs": "^1.1.12",
"@radix-ui/react-toast": "^1.2.14",
"@radix-ui/react-toggle": "^1.1.9",
"@radix-ui/react-toggle-group": "^1.1.10",
"@radix-ui/react-tooltip": "^1.2.7",
"@supabase/supabase-js": "^2.57.4",
"@tanstack/react-query": "^5.83.0",
"@tanstack/react-query-devtools": "^5.90.2",
"@tanstack/react-virtual": "^3.13.12",
"@types/dompurify": "^3.2.0",
"@uppy/core": "^5.0.2",
"@uppy/dashboard": "^5.0.2",
"@uppy/image-editor": "^4.0.1",
"@uppy/react": "^5.1.0",
"@uppy/status-bar": "^5.0.1",
"@uppy/xhr-upload": "^5.0.1",
"@vercel/analytics": "^1.5.0",
"@vercel/node": "^5.5.2",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"date-fns": "^3.6.0",
"dompurify": "^3.3.0",
"embla-carousel-react": "^8.6.0",
"idb": "^8.0.3",
"input-otp": "^1.4.2",
"lucide-react": "^0.462.0",
"next-themes": "^0.3.0",
"react": "^18.3.1",
"react-day-picker": "^8.10.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.61.1",
"react-markdown": "^9.1.0",
"react-resizable-panels": "^2.1.9",
"react-router-dom": "^6.30.1",
"recharts": "^2.15.4",
"rehype-sanitize": "^6.0.0",
"sonner": "^1.7.4",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"use-debounce": "^10.0.6",
"vaul": "^0.9.9",
"zod": "^4.1.11"
},
"devDependencies": {
"@eslint/js": "^9.32.0",
"@tailwindcss/typography": "^0.5.16",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.0",
"@types/node": "^22.16.5",
"@types/react": "^18.3.23",
"@types/react-dom": "^18.3.7",
"@vitejs/plugin-react-swc": "^3.11.0",
"@vitest/coverage-v8": "^4.0.8",
"@vitest/ui": "^4.0.8",
"autoprefixer": "^10.4.21",
"eslint": "^9.32.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"globals": "^15.15.0",
"happy-dom": "^20.0.10",
"jsdom": "^27.1.0",
"lovable-tagger": "^1.1.9",
"postcss": "^8.5.6",
"tailwindcss": "^3.4.17",
"typescript": "^5.8.3",
"typescript-eslint": "^8.38.0",
"vite": "^5.4.19",
"vitest": "^4.0.8"
}
}