Skip to content

test(jest): Share React across automatic mock registries - #126567

Merged
nsdeschenes merged 2 commits into
masterfrom
nd/test-jest-shared-react-instance
Oct 9, 2026
Merged

nsdeschenes merged 2 commits into
masterfrom
nd/test-jest-shared-react-instance

Conversation

@nsdeschenes

@nsdeschenes nsdeschenes commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Jest evaluates dependencies in a separate module registry while generating automatic mocks. Share the real React instance across those registries so nuqs reuses its adapter context.

Add a regression combining an automatic hook mock with real query-state reads and updates.

Discovered while exploring: #126218

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 6, 2026
@nsdeschenes
nsdeschenes marked this pull request as ready for review October 6, 2026 17:49
@nsdeschenes
nsdeschenes requested review from a team as code owners October 6, 2026 17:49
@nsdeschenes
nsdeschenes merged commit 2dc3e28 into master Oct 9, 2026
80 checks passed
@nsdeschenes
nsdeschenes deleted the nd/test-jest-shared-react-instance branch October 9, 2026 11:13
nsdeschenes added a commit that referenced this pull request Oct 9, 2026
The automock regression added in #126567 uses a native button,
increasing the file's `@sentry/scraps/prefer-primitives` violations from
three to four and exceeding its lint budget.

Use the Scraps `Button` in that regression so lint passes and the
query-state interaction stays covered.

Validation:
- Oxlint passed for all three files from #126567.
- Pre-commit checks passed.
- All nine `nuqsTestingAdapter` tests passed.

This branch was successfully deployed

1 active deployment
Preview — 7d66fa35 Deployed Oct 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants