Skip to content

test: add test cases to verify entry import array works#7168

Merged
chenjiahan merged 3 commits intomainfrom
e2e_entry_0210
Feb 10, 2026
Merged

test: add test cases to verify entry import array works#7168
chenjiahan merged 3 commits intomainfrom
e2e_entry_0210

Conversation

@chenjiahan
Copy link
Member

Summary

Added a new test case to verify that multiple entry imports work correctly in both dev and build modes.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings February 10, 2026 09:28
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • New Test Case: Added a new end-to-end test case to verify that multiple entry imports configured as an array work correctly in both development and build modes.
Changelog
  • e2e/cases/source/entry-import-array/index.test.ts
    • Added a new e2e test file to validate entry import array functionality.
  • e2e/cases/source/entry-import-array/rsbuild.config.ts
    • Added a new RSBuild configuration file defining an entry point with an import array.
  • e2e/cases/source/entry-import-array/src/first.js
    • Added a new JavaScript file to initialize a global entry order array for testing.
  • e2e/cases/source/entry-import-array/src/second.js
    • Added another JavaScript file to append to the global entry order array and update the DOM for testing.
Activity
  • No activity has occurred on this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-array E2E case with two entry modules to validate execution order.
  • Add an rsbuild.config.ts configuring source.entry.index.import as 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>
Copilot AI review requested due to automatic review settings February 10, 2026 09:40
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@chenjiahan chenjiahan merged commit 0afec57 into main Feb 10, 2026
5 checks passed
@chenjiahan chenjiahan deleted the e2e_entry_0210 branch February 10, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant