-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix!: rewrite spying implementation to make mocking more intuitive #8363
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
Merged
Merged
Changes from 21 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
716e207
fix!: rewrite spying implementation to make module mocking more logical
sheremet-va 2082369
chore: lint
sheremet-va f657700
fix: copy static props, restore some previous behaviours
sheremet-va d3f87e4
fix: do not copy getters
sheremet-va bfda423
fix: keep getters and setters in spy mode
sheremet-va 86eb9b1
chore: lint
sheremet-va 6a1ba96
fix: keep using the original name in vi.spyOn
sheremet-va b3f3e22
docs: add migration guide
sheremet-va 3cc251b
chore: remove debugging comment
sheremet-va fde9888
test: fix browser snapshot test
sheremet-va 9bae554
fix: don't allow overriding mock.mock
sheremet-va f7d0227
docs: add example of mock.mock to jest differences
sheremet-va 97c01d8
chore: remove tinyspy from dependencies
sheremet-va bec02bf
refactor: cleanup
sheremet-va 5f12b6a
docs: cleanup
sheremet-va 0e14a62
test: more test
sheremet-va 2a03266
docs: add mocking modules guide
sheremet-va b6932df
fix: don't empty array if `spy` is set to `true`
sheremet-va 46b4846
chore: fix links
sheremet-va 93cb84c
docs: cleanup
sheremet-va c1e2252
docs: cleanup
sheremet-va 1cb2d0d
chore: add a log for console.warn
sheremet-va 4bb8b5e
docs: add virtual modules
sheremet-va 35c3aef
docs: update mocking docs
sheremet-va 6c2a4d5
test: don't use using
sheremet-va 952755d
docs: remove irrelevant comment
sheremet-va 72a0634
docs: fix link
sheremet-va 5a32529
docs: cleanup
sheremet-va 34adde5
chore: cleanup
sheremet-va 4f48ca9
Merge branch 'main' of github.com:vitest-dev/vitest into fix/mocking-…
sheremet-va 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
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.