create-react-app 使用中相关问题整理Updated: 2025-08-191.test添加代码覆盖率 🔗命令修改为1 react-scripts test --coverage --watchAll=false package.json 1 2 3 4 5 6 7 8 9 10 11 12 "jest": { "collectCoverageFrom": [ "src/**/*.{js,jsx,ts,tsx}", "!<rootDir>/node_modules/" ], "coverageThreshold": { "global": { "lines": 90, "statements": 90 } } } Like Save Share