-
-
Notifications
You must be signed in to change notification settings - Fork 232
test(e2e): replace manual file lookup with helpers #6248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR simplifies E2E test files by introducing two new helper functions (findFile and getFileContent) to replace manual file lookup logic throughout the test suite. The changes reduce code duplication and improve maintainability of file operations in tests.
- Adds
findFileandgetFileContenthelper functions with hash-aware file matching - Removes unused
pluginsparameter from the build/dev API functions - Standardizes plugin configuration to be consistently placed under
config.plugins
Reviewed Changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| e2e/helper/utils.ts | Adds new file helper functions with type definitions and hash pattern matching |
| e2e/helper/jsApi.ts | Removes unused plugins parameter from build/dev functions and simplifies createRsbuild |
| e2e/cases/polyfill/helper.ts | Refactored to use new findFile helper instead of manual file lookup |
| Various test files | Updated to use getFileContent helper and moved plugins to config object |
| Various config files | Added missing plugin imports to rsbuild.config.ts files |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting

Summary
Simplify test files by introducing the new
findFIleandgetFileContenthelpers to find and read files instead of manual lookup logic.Checklist