-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
feat: Allow mocking property value in tests #13496
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
+689
−10
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
15697c7
feat(jest-mock): Add mockProperty() method
9c270ca
feat(jest-environment): Add mockProperty() method type to global Jest…
20b881b
refactor(jest-mock): Be more strict for MockedPropertyRestorer generi…
930036d
refactor(jest-mock): Allow mocking property named '0' or ""
c739864
refactor(jest-mock): Throw more descriptive error messages when tryin…
0f227c2
refactor(jest-mock): Allow mocking already mocked property with diffe…
1c4535b
refactor(jest-mock): Add type tests for mockProperty
4a1aeb6
refactor(jest-runtime): Fix missing mockProperty export
c79837d
Merge remote-tracking branch 'upstream/main'
cceffa0
refactor(jest-mock): Fix typing and interface of mockProperty methods
6c17cc0
refactor(jest-mock, docs): Document replaceProperty method and its im…
d828f11
refactor(docs): Remove forgotten TODO
4f9ac47
refactor(jest-mock, jest-types): Add additional tests for replaced pr…
b3fb383
refactor(jest-environment, jest-globals): Fix JSDoc comments for repl…
208df4d
refactor(docs): Improve style of replaced property sections and apply…
2ed2ca8
Merge branch 'main' into main
SimenB ba36a3b
Update docs/MockFunctionAPI.md
SimenB 25d1b24
Merge remote-tracking branch 'upstream/main'
472841c
refactor(jest-mock): Fix type tests compatibility with TS 4.3
2f9c9c9
refactor(jest-runtime): Fix forgotten rename of replaceProperty from …
33c30b9
refactor(jest-mock): Hint to use replaceProperty when trying to mock …
f0ffae1
refactor(docs): Relate two files in examples by providing correct path
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
refactor(jest-mock): Throw more descriptive error messages when tryin…
…g to mock a property
- Loading branch information
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
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.