-
-
Notifications
You must be signed in to change notification settings - Fork 236
test(e2e): add test cases for preserve JSX runtime #6243
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
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 adds test cases for preserve JSX runtime mode and standardizes test descriptions by making them more concise. The changes primarily focus on testing React JSX runtime configurations and improving test readability.
- Add comprehensive test coverage for preserve JSX runtime mode including new test files and configuration
- Update test descriptions across multiple files to use shorter, more consistent naming (e.g., "in dev" instead of "in development correctly")
- Replace legacy JSX test with classic JSX runtime test to better reflect current testing needs
Reviewed Changes
Copilot reviewed 14 out of 17 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| e2e/cases/plugin-react/jsx-runtime-preserve/ | New test case for preserve JSX runtime with complete React app setup |
| e2e/cases/plugin-react/jsx-runtime-classic/index.test.ts | New test for classic JSX runtime replacing legacy JSX test |
| e2e/cases/plugin-react/legacy-jsx/index.test.ts | Removed legacy JSX test file |
| Multiple test files | Updated test descriptions to be more concise and consistent |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| expect( | ||
| (await content).includes('<div id="test">Hello Rsbuild!</div>'), | ||
| ).toBeTruthy(); |
Copilot
AI
Sep 24, 2025
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.
The parentheses around await content are unnecessary. The await operation has higher precedence than the method call, so this can be simplified to expect((await content).includes('<div id="test">Hello Rsbuild!</div>')).toBeTruthy(); or better yet, use a more specific assertion like expect(await content).toContain('<div id="test">Hello Rsbuild!</div>');
| expect( | |
| (await content).includes('<div id="test">Hello Rsbuild!</div>'), | |
| ).toBeTruthy(); | |
| expect(await content).toContain('<div id="test">Hello Rsbuild!</div>'); |
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |

Summary
Checklist