test(e2e): add tests to ensure no deprecation logs are printed#6873
test(e2e): add tests to ensure no deprecation logs are printed#6873chenjiahan merged 3 commits intomainfrom
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR adds end-to-end tests to verify that no deprecation warnings are printed during the build process in both development and production modes.
Key Changes:
- Adds regex pattern to detect deprecation-related log messages
- Implements tests for both dev and build modes to ensure clean logs
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
e2e/cases/diagnostic/no-deprecation-logs/index.test.ts |
Adds two test cases that verify no deprecation logs appear in dev and build modes |
e2e/cases/diagnostic/no-deprecation-logs/src/index.js |
Empty source file for the test case |
After thoroughly reviewing this pull request, I found no issues with the implementation. The test follows established patterns in the codebase:
- ✅ The regex pattern
/deprecated|deprecation/iis appropriate for catching deprecation messages - ✅ The use of
expectBuildEnd()followed byexpectNoLog()matches the pattern used in similar tests (e.g.,lazy-compilation/basic/index.test.ts) - ✅ The test structure with separate cases for dev and build modes is consistent with other diagnostic tests (e.g.,
build-time/index.test.ts) - ✅ The API usage is correct -
expectNoLogis synchronous and doesn't require await - ✅ The test names are clear and descriptive
The implementation is clean, follows project conventions, and should effectively catch any deprecation warnings that might appear in the build logs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Summary
Added a test case to check that no deprecation messages appear in the logs during both dev and build modes.
Checklist