Skip to content

refactor: move Rstest examples to rstest folder#433

Merged
chenjiahan merged 2 commits intomainfrom
move_test_0416
Apr 16, 2026
Merged

refactor: move Rstest examples to rstest folder#433
chenjiahan merged 2 commits intomainfrom
move_test_0416

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Move some Rstest examples to rstest folder.

Copilot AI review requested due to automatic review settings April 16, 2026 02:40
Copy link
Copy Markdown

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

Moves Rstest-related examples under the rstest/ workspace and standardizes how the Rstest CLI is invoked across several example packages.

Changes:

  • Update multiple Rstest example package.json test scripts from rstest run to rstest (and --update accordingly).
  • Add a new rstest/rsbuild-react example project (config, source, tests) and rename its package scope/name.
  • Remove the previous rsbuild/react-rstest and rsbuild/react-jest example folders/files.

Reviewed changes

Copilot reviewed 23 out of 37 changed files in this pull request and generated no comments.

Show a summary per file
File Description
rstest/snapshot/package.json Switch snapshot example scripts to rstest / rstest --update.
rstest/rslib-adapter/package.json Switch test script to rstest.
rstest/rsbuild-svelte/package.json Switch test script to rstest.
rstest/rsbuild-solid/package.json Switch test script to rstest.
rstest/rsbuild-react/tsconfig.json Add TS config for the new rsbuild+react Rstest example.
rstest/rsbuild-react/tests/tsconfig.json Add test TS config and test environment type definitions.
rstest/rsbuild-react/tests/App.spec.tsx Add a basic React Testing Library spec.
rstest/rsbuild-react/src/index.tsx Add React app entrypoint.
rstest/rsbuild-react/src/env.d.ts Add Rsbuild type references.
rstest/rsbuild-react/src/App.tsx Add the example React component (imports CSS).
rstest/rsbuild-react/src/App.css Add basic styling for the example app.
rstest/rsbuild-react/rstest.setup.ts Add RTL jest-dom setup import.
rstest/rsbuild-react/rstest.config.ts Add Rstest configuration for the example (currently Rsbuild integration approach differs from other examples).
rstest/rsbuild-react/rsbuild.config.ts Add Rsbuild configuration for the example.
rstest/rsbuild-react/package.json Rename package to @rstest-example/rsbuild-react and switch test script to rstest.
rstest/rsbuild-react/README.md Add usage/readme for the new example.
rstest/rsbuild-react/.gitignore Add ignores for the new example.
rstest/rsbuild-preact/package.json Switch test script to rstest.
rstest/rsbuild-adapter/package.json Switch test script to rstest.
rstest/mocking/package.json Switch test script to rstest.
rstest/fake-timers/package.json Switch test script to rstest.
rsbuild/react-rstest/tsconfig.json Remove old rsbuild react-rstest example file.
rsbuild/react-rstest/tests/App.spec.tsx Remove old rsbuild react-rstest example test.
rsbuild/react-rstest/src/index.tsx Remove old rsbuild react-rstest example entrypoint.
rsbuild/react-rstest/src/env.d.ts Remove old rsbuild react-rstest example env types.
rsbuild/react-rstest/src/App.tsx Remove old rsbuild react-rstest example component.
rsbuild/react-rstest/src/App.css Remove old rsbuild react-rstest example CSS.
rsbuild/react-rstest/rsbuild.config.ts Remove old rsbuild react-rstest example config.
rsbuild/react-rstest/.gitignore Remove old rsbuild react-rstest example gitignore.
rsbuild/react-jest/tests/tsconfig.json Remove old rsbuild react-jest example test TS config.
rsbuild/react-jest/tests/mocks/styleMock.js Remove Jest CSS mock.
rsbuild/react-jest/tests/mocks/fileMock.js Remove Jest asset mock.
rsbuild/react-jest/package.json Remove old Jest-based example package.
rsbuild/react-jest/jest.config.ts Remove Jest config.
rsbuild/react-jest/jest-setup.ts Remove Jest setup file.
rsbuild/react-jest/README.md Remove Jest example README.
Comments suppressed due to low confidence (1)

rstest/rsbuild-react/package.json:10

  • If this package is intended to run tests using the Rsbuild pipeline (as implied by the presence of rsbuild.config.ts and rstest.config.ts), @rstest/adapter-rsbuild should be included in devDependencies (consistent with other rstest/rsbuild-* examples). Without the adapter, tests may fail to compile/resolve non-JS imports such as src/App.tsx importing ./App.css.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chenjiahan chenjiahan merged commit 838e55c into main Apr 16, 2026
3 checks passed
@chenjiahan chenjiahan deleted the move_test_0416 branch April 16, 2026 03:09
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.

2 participants