-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
docs: update MockFunctionAPI.md #12552
Conversation
Writing syntactic sugar seems a weird thing for the doc probably can write another way of doing something |
@skychx Thanks. Seems like a good idea. Could you add these to versioned docs too, please? They live here: https://github.com/facebook/jest/tree/main/website/versioned_docs |
Yes! I just submitted it 660dc88 |
@@ -221,6 +227,12 @@ mock(); // 43 | |||
|
|||
### `mockFn.mockReturnValueOnce(value)` | |||
|
|||
Syntactic sugar function for: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't syntax, it's just another API. Maybe we should say "Shorthand for:" instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am referring to the old documentation for writing, eg: mockFn.mockResolvedValue(value)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hah. well, it's wrong there as well 😀 wanna clean them all up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
update MockFunctionAPI.md
Test plan
No testing required to modify documents