-
Notifications
You must be signed in to change notification settings - Fork 5k
test: support auto-mock for jest.mock(module) / jest.requireMock #29836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
robobun
wants to merge
36
commits into
main
Choose a base branch
from
farm/80129f56/jest-auto-mock
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
a4a9640
test: support auto-mock for jest.mock(module) / jest.requireMock
robobun f3724cf
address coderabbit review
robobun c17337d
fix CI: update ENG-24434 test + include symbol-keyed properties
robobun d9017bb
address coderabbit: seed visited with mockProto, isolate parity tests
robobun 33c473d
address claude: cache on-demand requireMock + remove dead topExceptio…
robobun cd5a969
test: fold auto-mock tests into mock-module.test.ts
robobun 0e79a8f
address review: preserve attrs, isolate requireMock cache, fix re-mock
robobun 6e463a4
fix: drop redundant JSMap has() call in auto-mock
robobun 17ec124
address review: stash-and-restore, clear cache, index-key safe put
robobun 4d97c19
fix(auto-mock): preserve primary exception when restoring stashed req…
robobun 266397c
chore: retry CI (prior 3 failures are pre-existing Windows/ASAN flakes)
robobun cc2150a
fix(auto-mock): declare restoreStash before requireMap stash guards
robobun f38d5ed
address review: init stashedRequireMapEntry + align jest.mock return …
robobun a1649b7
chore: retry CI (ssg-pages-router is a known bake-dev HMR flake)
robobun 7ba8617
chore: retry gate (prior runs had transient mimalloc download failures)
robobun 9ad46ce
chore: retry CI+gate (prior runs hit transient network fetch failures…
robobun e6cc1e8
fix(auto-mock): re-seat stashed virtualModules entry before block exit
robobun ce6c1cd
chore: retry CI (astro-post.test.js Windows segfault is documented fl…
robobun 6e65d2f
chore: retry CI (bun-create.test.ts hit GitHub API rate limit on Wind…
robobun a91e0aa
chore: retry CI
robobun 6a960a6
port requireMock wiring to Rust jest.rs (mirrors jest.zig)
robobun ba2e33a
fix(auto-mock): set mockProto.constructor = mockFn back-reference
robobun 51aec5f
ci: retrigger (fetch-tcp-keepalive flake on brand-new b8ecc78b03 code…
robobun caa78be
fix(auto-mock): guard virtualModules re-seat with hasVirtualModules()
robobun 3e8921e
refactor(auto-mock): extract shared resolveModuleMockSpecifier helper
robobun 57781ad
fix(auto-mock): don't set mustDoExpensiveRelativeLookup in requireMoc…
robobun 72f49f1
fix: include JSMap.h in JSMockFunction.h for Strong<JSMap> instantiation
robobun ab81853
fix(auto-mock): reset expensive-lookup flag on failure; don't re-eval…
robobun 08fccdf
Rework auto-mock walker to match jest-mock, add construct path, fix m…
robobun 8540d3b
Condense comments in the mock install and auto-mock walker blocks
robobun 4bc4154
Keep auto-mocks out of the ESM interop unwrap, stop the walk at the m…
robobun f13e021
Reset mustDoExpensiveRelativeLookup in Bun.plugin.clearAll()
robobun 6670956
Don't spin on a pending promise when patching an already-required mock
robobun d4abbfa
Share the promise-unwrap helper, make spawned tests concurrent
robobun 8dd0c61
[autofix.ci] apply automated fixes
autofix-ci[bot] b81ecb8
Give mocks a default prototype and mark unwrapped rejections handled
robobun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.