Skip to content

docs: audit and polish documentation against codebase - #2132

Draft
fi3ework wants to merge 2 commits into
mainfrom
docs/audit-and-polish
Draft

fi3ework wants to merge 2 commits into
mainfrom
docs/audit-and-polish

Conversation

@fi3ework

Copy link
Copy Markdown
Member

Motivation

Several documentation pages across website/docs/{en,zh}/ had drifted from the current implementation (stale defaults, deprecated flags presented as primary, inaccurate runtime/API type signatures, and missing public APIs/options) and contained verbose, repetitive phrasing or literal Chinese translations.

Changes

  • Fix behavioral and signature drift against source code:
    • Updated config defaults, types, and CLI flags (browser.instances, ConfigOverview.tsx, output.bundleDependencies, chaiConfig, reporters, coverage, snapshotFormat, env, globalSetup, projects, modifyRstestConfig).
    • Synced runtime and JavaScript API signatures and behavior with packages/core and packages/browser (RSTEST_WORKER_ID recycling, MockInstance return types and mock.contexts, rs.waitUntil, rs.setConfig/rs.getConfig, expect.element, expect.poll, TestContext, test.for/test.each, defineConfig/defineProject).
    • Corrected guide and adapter details (rs.importMock/rs.requireMock behavior, --browser.instances, rstest.browser.config.mts from init browser, ctx.task.meta in test hooks, test-filter matching rules, debugging/profiling paths and --pool.execArgv, adapter-rsbuild/adapter-rslib modify*Config return types, adapter-rspack mappings, rslint presets).
  • Fill documentation gaps:
    • Added EN/ZH reference pages for assert (api/runtime-api/test-api/assert.mdx) and documented registerFileCleanup, registerWorkerCleanup, PROJECT_LOADER, ListTestsError, RunOptions, Reporter.flushOutputStreams, RSTEST_OUTPUT_MODULE, RSTEST_NO_AGENT, DEBUG, adapter-rspack's toRstestConfig, adapter-rslib's experimentalDecorators auto-detection, and missing CLI flags.
  • Tighten prose and EN/ZH parity:
    • Rewrote verbose/filler sections and Chinese translationese across guides, config, API, and integration pages into direct technical prose aligned with Rstack/Rsbuild doc conventions, keeping EN/ZH structure, headings, anchors, and **Type:** blocks in sync.

Validation

  • pnpm exec rs fmt --check
  • pnpm exec cspell --no-progress --quiet
  • pnpm run check-doc-types
  • pnpm run check-harness-docs
  • pnpm exec rs lint website/
  • pnpm --dir website build (254 pages built, 0 dead links/anchors)

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Deploying rstest with  Cloudflare Pages  Cloudflare Pages

Latest commit: a78835a
Status: ✅  Deploy successful!
Preview URL: https://6f60ad3d.rstest.pages.dev
Branch Preview URL: https://docs-audit-and-polish.rstest.pages.dev

View logs

This branch has not been deployed

No deployments
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.

1 participant

⌂ 换网址