Skip to content

docs: add mocking guide#1078

Merged
9aoy merged 1 commit intomainfrom
codex/docs-mock-guide
Mar 19, 2026
Merged

docs: add mocking guide#1078
9aoy merged 1 commit intomainfrom
codex/docs-mock-guide

Conversation

@9aoy
Copy link
Copy Markdown
Collaborator

@9aoy 9aoy commented Mar 19, 2026

Summary

Background

Rstest had API-level mock docs and scattered examples, but no basic guide that explained mocking workflows in one place.

Implementation

  • Added new English and Chinese Mocking guide pages under guide/basic.
  • Organized module mocking by ESM/CommonJS usage, hoisted and non-hoisted behavior, partial mocks, manual mocks, and module reset APIs.
  • Added sidebar entries and linked the relevant runtime API documentation from the new guide.

User Impact

Users now have a task-oriented mocking guide in both languages instead of piecing behavior together from API references and migration docs.

Checklist

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

Validation was not run locally because this environment does not provide node, npx, or pnpm. This PR is created as a draft for that reason.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying rstest with  Cloudflare Pages  Cloudflare Pages

Latest commit: 332fb90
Status: ✅  Deploy successful!
Preview URL: https://3065144d.rstest.pages.dev
Branch Preview URL: https://codex-docs-mock-guide.rstest.pages.dev

View logs

@9aoy 9aoy changed the title docs(website): add mocking guide docs: add mocking guide Mar 19, 2026
@9aoy 9aoy marked this pull request as ready for review March 19, 2026 10:01
@9aoy 9aoy merged commit 68bb4a4 into main Mar 19, 2026
9 checks passed
@9aoy 9aoy deleted the codex/docs-mock-guide branch March 19, 2026 11:29
@9aoy 9aoy mentioned this pull request Mar 26, 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.

1 participant