@testing-library/react v13 -> v14. v13 used deprecated ReactDOMTestUtils.act on every render -> 708 deprecation warnings. v14 imports act from react directly. Drops to 0. Mock _notify (src/__mocks__/firebase/_mock-db.js): wrap subscriber callbacks in act(() => cb()). Sync setState from subscribe callbacks fired outside test act boundary -> 14 warnings. Now 0. try/catch fallback if react/act unavailable (defensive). Full suite: 166 pass / 1 fail (Combat.scenario BUG-11 pre-existing crash). Warnings: 1416 -> 0. Note: NOT complete kill-shared. App.js still inlines 8 logic fns (startEncounter, nextTurn, togglePause, endEncounter, addParticipant, updateParticipant, reorder/drag). turn.js versions dead in app, used by replay + turn tests only. Next: make handlers call turn.js.
54 lines
1.2 KiB
JSON
54 lines
1.2 KiB
JSON
{
|
|
"name": "ttrpg-initiative-tracker",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"workspaces": [
|
|
"server",
|
|
"shared"
|
|
],
|
|
"dependencies": {
|
|
"@testing-library/jest-dom": "^5.17.0",
|
|
"@testing-library/user-event": "^13.5.0",
|
|
"autoprefixer": "^10.4.19",
|
|
"firebase": "^10.12.2",
|
|
"lucide-react": "^0.395.0",
|
|
"postcss": "^8.4.38",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"react-scripts": "5.0.1",
|
|
"tailwindcss": "^3.4.3",
|
|
"web-vitals": "^2.1.4"
|
|
},
|
|
"scripts": {
|
|
"start": "react-scripts start",
|
|
"build": "react-scripts build",
|
|
"test": "react-scripts test",
|
|
"eject": "react-scripts eject",
|
|
"server:dev": "npm run dev --workspace server",
|
|
"server:test": "npm test --workspace server",
|
|
"shared:test": "npm test --workspace shared",
|
|
"test:all": "npm run shared:test && npm run server:test"
|
|
},
|
|
"eslintConfig": {
|
|
"extends": [
|
|
"react-app",
|
|
"react-app/jest"
|
|
]
|
|
},
|
|
"browserslist": {
|
|
"production": [
|
|
">0.2%",
|
|
"not dead",
|
|
"not op_mini all"
|
|
],
|
|
"development": [
|
|
"last 1 chrome version",
|
|
"last 1 firefox version",
|
|
"last 1 safari version"
|
|
]
|
|
},
|
|
"devDependencies": {
|
|
"@testing-library/react": "^14.3.1"
|
|
}
|
|
}
|