Conversation
Deploying rstest with
|
| Latest commit: |
4fb2893
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5cff55ad.rstest.pages.dev |
| Branch Preview URL: | https://vue-guide.rstest.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds first-class Vue support to Rstest’s documentation and repository examples, showing how to test Vue components in Node and setting up a dedicated Vue example project.
Changes:
- Add English and Chinese Vue framework guides, including Node-based testing examples, JSX usage, and mocking patterns.
- Register the Vue guide in the framework navigation metadata for both locales.
- Introduce a new
examples/vuepackage (with config, source components, and tests) and wire it into the workspace andpnpm-lock.yaml.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
website/docs/en/guide/framework/vue.mdx |
New English Vue testing guide covering Node testing, Vue JSX, event tests, module mocking, and Browser Mode notes (with a small config import mismatch noted in review). |
website/docs/zh/guide/framework/vue.mdx |
Chinese translation of the Vue testing guide mirroring the English content (also affected by the same config import issue). |
website/docs/en/guide/framework/_meta.json |
Adds vue to the English framework guide navigation so the Vue page appears alongside React. |
website/docs/zh/guide/framework/_meta.json |
Adds vue to the Chinese framework guide navigation. |
pnpm-lock.yaml |
Updates lockfile to include the new examples/vue workspace with its Vue, Rsbuild, Rstest, and testing dependencies. |
examples/vue/package.json |
Defines the new @examples/vue package, its Rstest test scripts, and Vue/Rsbuild/test-related dependencies. |
examples/vue/tsconfig.json |
TypeScript configuration for the Vue example, enabling DOM/ES2020 features and Vue JSX (jsxImportSource: "vue"). |
examples/vue/rsbuild.config.ts |
Rsbuild configuration for the Vue example, enabling Vue and Vue JSX via pluginVue and pluginVueJsx plus a Babel plugin for JSX/TSX. |
examples/vue/rstest.config.ts |
Rstest configuration for the Vue example that sets up Rsbuild plugins and uses the happy-dom test environment. |
examples/vue/src/App.vue |
Simple Vue SFC demonstrating a greeting prop with defaults and basic styling, used by the example tests. |
examples/vue/src/Counter.vue |
Vue SFC counter component with an initialCount prop and Increment button, serving as the target for SFC tests. |
examples/vue/src/Counter.tsx |
Vue JSX counter component with initialCount prop and increment emit, used for JSX testing examples. |
examples/vue/test/App.test.ts |
Rstest + Vue Test Utils tests validating default and custom greetings in App.vue. |
examples/vue/test/Counter.test.ts |
Tests for the SFC Counter verifying default/custom initial counts and click-based increment behavior. |
examples/vue/test/CounterJsx.test.ts |
Tests for the JSX Counter verifying initial/custom counts, click increments, and emitted increment events. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduce how to test Vue applications and components with Rstest.
Related Links
Checklist