-
-
Notifications
You must be signed in to change notification settings - Fork 17
feat: add new adapter for Rsbuild #830
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 rstest-dev 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 adds @rstest/adapter-rsbuild, a new official adapter that allows Rstest to automatically inherit configuration from Rsbuild config files. This enables seamless integration between Rstest and Rsbuild projects, eliminating configuration duplication.
Key Changes
- Introduces
@rstest/adapter-rsbuildpackage withwithRsbuildConfig()function for extending Rstest config from Rsbuild - Adds comprehensive documentation in both English and Chinese explaining installation, usage, and configuration mapping
- Updates the React example to demonstrate the adapter usage, migrating from jsdom to happy-dom
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/adapter-rsbuild/src/index.ts | Core implementation of the adapter with config loading and conversion logic |
| packages/adapter-rsbuild/tests/index.test.ts | Test suite covering config loading, environment merging, and error handling |
| packages/adapter-rsbuild/package.json | Package configuration with dependencies and metadata |
| packages/adapter-rsbuild/README.md | Comprehensive adapter documentation with usage examples |
| packages/adapter-rsbuild/rslib.config.mts | Build configuration for the adapter package |
| packages/adapter-rsbuild/rstest.config.ts | Test configuration for the adapter package |
| packages/adapter-rsbuild/tsconfig.json | TypeScript configuration for the adapter |
| website/docs/en/guide/integration/rsbuild.mdx | English integration guide |
| website/docs/zh/guide/integration/rsbuild.mdx | Chinese integration guide |
| website/docs/en/guide/integration/adapters.mdx | Added Rsbuild adapter reference |
| website/docs/zh/guide/integration/adapters.mdx | Added Rsbuild adapter reference (Chinese) |
| website/docs/en/guide/integration/_meta.json | Updated navigation metadata |
| website/docs/zh/guide/integration/_meta.json | Updated navigation metadata (Chinese) |
| examples/react/rstest.config.ts | Refactored to use the new adapter |
| examples/react/package.json | Updated dependencies to use adapter and happy-dom |
| pnpm-lock.yaml | Dependency updates for new adapter package |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: neverland <chenjiahan.jait@bytedance.com>
Co-authored-by: neverland <chenjiahan.jait@bytedance.com>
Summary
Support extend Rstest configuration from Rsbuild config file via
@rstest/adapter-rsbuild.Related Links
Checklist