con un clic
testing
// Testing workflow for the rstest monorepo. Use when running tests, writing test files, debugging test failures, or validating changes.
// Testing workflow for the rstest monorepo. Use when running tests, writing test files, debugging test failures, or validating changes.
Generate a narrative version release blog post from commits within a tag range. Use when the user wants to draft an article-style release blog (overview + a few feature highlights + a short list of minor changes), not a commit-dump release note. Asks the user to multi-select which features to highlight, then writes a bilingual draft under website/docs/{en,zh}/blog/.
Create or update draft GitHub releases for the current project's main GitHub repository, then organize GitHub-generated release notes into user-friendly sections without rewriting release note items. Use for preparing, formatting, categorizing, creating, or updating GitHub release notes or draft releases.
Feature and bug-fix development checklist. Use when implementing a new feature, fixing a bug, or making behavioral changes to ensure nothing is missed before PR.
TypeScript anti-slop guardrails. Use when writing or reviewing .ts, .tsx, and .mts files. Covers patterns that Biome, tsc, and rslint do not catch.
| name | testing |
| description | Testing workflow for the rstest monorepo. Use when running tests, writing test files, debugging test failures, or validating changes. |
| metadata | {"internal":true} |
pnpm rstest packages/core/tests/core/rsbuild.test.ts
Use this form for tests discovered by the root workspace config.
Do not pass e2e/... paths to the root pnpm rstest command.
pnpm --filter @rstest/core test
pnpm --filter @rstest/core test -- tests/core/rsbuild.test.ts # single file
Run e2e tests from inside the e2e/ directory.
When passing the test path, strip the e2e/ prefix because the working directory is already e2e/.
cd e2e && pnpm test <path-to-test>
To run tests in a fixture directory directly:
cd e2e/<test>/fixtures/<fixture>/ && npx rstest
E2E tests and examples execute against built package output, not TypeScript sources. If you changed package source code, you must rebuild before running e2e:
pnpm --filter @rstest/core build # or whichever package was changed
cd e2e && pnpm test <path>
Forgetting this step means e2e runs against stale output — a common source of false passes/failures.
When the change may affect multiple packages, prefer a full workspace package build first:
pnpm build
cd e2e && pnpm test <path>
Important:
pnpm build and pnpm e2e in separate sessions.packages/core/dist/rstestSuppressWarnings.cjs, treat that as an incomplete build and rebuild before retrying.headless: true — no browser windows locallycd e2e && RSTEST_E2E_RUN_HEADED=true pnpm test browser-mode/basic.test.tsdist/.rstest-temp/A fixture that enables performance.buildCache (or dev.writeToDisk: true) forces rstest to persist the built bundle under <cwd>/dist/.rstest-temp/. If sibling test files share that cwd, those persistent writes race against any test asserting on the default path. Other disk writers like coverage or blob reporters land in <cwd>/coverage/ or <cwd>/.rstest-reports/ — different surfaces, not covered by this rule.
When your fixture enables persistent build output:
cwd to the fixture subdirectory, not the parent test directory.include referencing paths outside the fixture (e.g. './fixtures/<name>/index.test.ts'). Fixture-local globs like './*.test.ts' are fine.dist/.rstest-temp/ assertions from that isolated fixture dir, not from a shared parent.-u / --update: pnpm rstest -u packages/core/tests/core/rsbuild.test.tspnpm run check-unused is part of the default validation pass for code changes in this repo. Run it before wrapping up, even when focused tests already pass.check-unused failures as real regressions unless you have confirmed the reported item is an intentional temporary state.