dengliming opened a new pull request, #658: URL: https://github.com/apache/shenyu-dashboard/pull/658
## What changes were proposed in this pull request? The existing component tests fail during jsdom initialization, while `test:all` starts a development server and includes obsolete Puppeteer examples that assert Ant Design Pro content. CI currently runs lint and build without running tests. This implements phase 1 of #657: - Run the existing unit/component suite directly with Jest 29 and jsdom, reusing the project's Babel syntax preset independently of Roadhog's build configuration. - Replace the only direct Enzyme test with a React Testing Library render test compatible with React 16. - Remove the stale Puppeteer examples, browser installation script, server-starting runner, and unused direct dependencies. Keep `test:all` as a documented alias for the unit/component suite. - Add single-run, watch, and coverage commands; use `npm ci` in the build workflow, run tests on PRs, and upload coverage reports. - Document Node.js 20, clean installation, test commands, and the E2E migration path. Coverage includes untested JavaScript sources. The initial line-coverage baseline is 1.14%; this PR does not impose a threshold. Business regression tests and real-backend E2E remain follow-up phases of #657. The lockfile changes reflect the new test dependency tree alongside Roadhog's transitive legacy test dependencies. Fixes #652. Refs #657 (phase 1 only). ## How was this patch tested? Locally with Node.js 20.20.0: - Clean `npm ci`, without a browser-download override or a running backend. - `CI=true npm run test:coverage`: 5 suites and 32 tests pass; HTML, LCOV, and JSON summary reports generated. - `npm run lint` and `npm run build`: pass, with existing style/build warnings. - Temporary failing assertion through `npm test -- --runTestsByPath ...`: exits with code 1; temporary test removed afterward. - `test:all` and `test:component` discovery/argument forwarding checked with `--listTests`. - `git diff --check`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
