fe23085e0f
- Use module-level EMPTY_TEMPLATE constant as default prop to prevent useEffect infinite loop (new [] each render changed identity every cycle) - Add htmlFor to date and dynamic field labels for proper a11y association - Add role=alert to date error paragraph so tests can find it - Update tests to pass a template with builtin fields (required by template- driven component design) and mock experimentsApi - Add --max-old-space-size=8192 to test scripts to prevent OOM on full suite All 72 frontend tests now pass across 7 suites. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
51 lines
1.4 KiB
JSON
51 lines
1.4 KiB
JSON
{
|
|
"name": "experiments-frontend",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"test": "node --max-old-space-size=8192 node_modules/.bin/jest --runInBand --forceExit",
|
|
"test:coverage": "node --max-old-space-size=8192 node_modules/.bin/jest --runInBand --forceExit --coverage",
|
|
"test:e2e": "playwright test"
|
|
},
|
|
"dependencies": {
|
|
"axios": "^1.7.2",
|
|
"recharts": "^2.12.7",
|
|
"date-fns": "^3.6.0",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"react-router-dom": "^6.24.0"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "^7.24.7",
|
|
"@babel/preset-env": "^7.24.7",
|
|
"@babel/preset-react": "^7.24.6",
|
|
"@playwright/test": "^1.44.1",
|
|
"@testing-library/jest-dom": "^6.4.6",
|
|
"@testing-library/react": "^14.3.1",
|
|
"@testing-library/user-event": "^14.5.2",
|
|
"@vitejs/plugin-react": "^4.2.1",
|
|
"autoprefixer": "^10.4.19",
|
|
"babel-jest": "^29.7.0",
|
|
"identity-obj-proxy": "^3.0.0",
|
|
"jest": "^29.7.0",
|
|
"jest-environment-jsdom": "^29.7.0",
|
|
"postcss": "^8.4.39",
|
|
"tailwindcss": "^3.4.4",
|
|
"vite": "^4.5.3"
|
|
},
|
|
"jest": {
|
|
"testEnvironment": "jsdom",
|
|
"setupFilesAfterEnv": ["<rootDir>/tests/setup.js"],
|
|
"testMatch": ["**/tests/**/*.test.{js,jsx}"],
|
|
"transform": {
|
|
"^.+\\.[jt]sx?$": "babel-jest"
|
|
},
|
|
"moduleNameMapper": {
|
|
"\\.(css|less|scss|sass)$": "identity-obj-proxy"
|
|
}
|
|
}
|
|
}
|