Skip to content

docs: add vue guide#905

Merged
9aoy merged 4 commits intomainfrom
vue-guide
Jan 26, 2026
Merged

docs: add vue guide#905
9aoy merged 4 commits intomainfrom
vue-guide

Conversation

@9aoy
Copy link
Copy Markdown
Collaborator

@9aoy 9aoy commented Jan 26, 2026

Summary

Introduce how to test Vue applications and components with Rstest.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings January 26, 2026 08:35
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Jan 26, 2026

Deploying rstest with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4fb2893
Status: ✅  Deploy successful!
Preview URL: https://5cff55ad.rstest.pages.dev
Branch Preview URL: https://vue-guide.rstest.pages.dev

View logs

Copy link
Copy Markdown
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

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/vue package (with config, source components, and tests) and wire it into the workspace and pnpm-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.

@9aoy 9aoy merged commit 8a44eb8 into main Jan 26, 2026
10 checks passed
@9aoy 9aoy deleted the vue-guide branch January 26, 2026 09:31
@9aoy 9aoy mentioned this pull request Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants