Skip to content

docs: explain Sinon 20 fake server migration - #2787

Open
GreedyC wants to merge 1 commit into
sinonjs:mainfrom
GreedyC:codex/document-sinon20-migration
Open

GreedyC wants to merge 1 commit into
sinonjs:mainfrom
GreedyC:codex/document-sinon20-migration

Conversation

@GreedyC

@GreedyC GreedyC commented Oct 17, 2026

Copy link
Copy Markdown

Purpose (TL;DR) - mandatory

Fixes #2652 by adding the missing Sinon 20 migration section. Explain how existing XMLHttpRequest-based tests can use nise directly after the fake XHR and server APIs were unbundled.

The guide maps the removed APIs to their nise equivalents and explicitly calls out cleanup: fakes created directly through nise are not restored by a Sinon sandbox. It also distinguishes XMLHttpRequest from fetch.

How to verify - mandatory

  1. npm ci --ignore-scripts and npm run build-artifacts in the repository root.
  2. npm run lint and npx prettier --check docs/guides/migration.md.
  3. In docs/, run npm ci --ignore-scripts, npm run docs:build and npm run test:docs.

These checks passed locally; the documentation tests reported 732 passing assertions across 251 suites. A separate nise installation was also used to verify a fake server response, the XHR factory/class mapping and explicit restoration. No library runtime files or dependencies are changed.

Checklist for author

  • npm run lint passes
  • References to standard library functions are cached. (Not applicable: documentation-only change.)

AI assistance: Codex helped prepare the guide and run validation.

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.

Improve migration guide re v20

1 participant