test: add test cases to verify entry import array works#7168
test: add test cases to verify entry import array works#7168chenjiahan merged 3 commits intomainfrom
Conversation
Summary of ChangesHello @chenjiahan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces new end-to-end tests to ensure the robust handling of multiple entry points when defined as an array in the RSBuild configuration. The tests validate that the specified entry files are correctly processed and loaded in the intended order for both development and production builds, enhancing the reliability of the build system's entry point resolution. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds a new e2e test case to verify that an array of imports for a source entry works as expected in both development and build modes. The test setup is correct and achieves its goal. I've provided a couple of suggestions to improve the robustness and maintainability of the test scripts by making them more modular and less dependent on a specific execution order for initialization.
There was a problem hiding this comment.
Pull request overview
Adds a new E2E test case ensuring Rsbuild supports an entry import specified as an array, and that the modules execute in the expected order in both dev server and build preview modes.
Changes:
- Add a new
entry-import-arrayE2E case with two entry modules to validate execution order. - Add an
rsbuild.config.tsconfiguringsource.entry.index.importas an array. - Add dev + build-preview Playwright tests asserting the rendered order.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| e2e/cases/source/entry-import-array/src/first.js | Initializes a global order array to detect module execution order. |
| e2e/cases/source/entry-import-array/src/second.js | Appends to the order array and renders it into #app for assertion. |
| e2e/cases/source/entry-import-array/rsbuild.config.ts | Configures index entry to use an import array (first.js, second.js). |
| e2e/cases/source/entry-import-array/index.test.ts | Verifies the expected DOM output in both dev and build preview modes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Added a new test case to verify that multiple entry imports work correctly in both dev and build modes.
Checklist