Skip to content
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

Closed
wants to merge 2 commits into from
Closed

docs: update MockFunctionAPI.md #12552

wants to merge 2 commits into from

Conversation

skychx
Copy link

@skychx skychx commented Mar 6, 2022

Summary

update MockFunctionAPI.md

Test plan

No testing required to modify documents

@Biki-das
Copy link
Contributor

Biki-das commented Mar 6, 2022

Writing syntactic sugar seems a weird thing for the doc probably can write another way of doing something

@mrazauskas
Copy link
Contributor

@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

@skychx
Copy link
Author

skychx commented Mar 6, 2022

@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:
Copy link
Member

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?

Copy link
Author

@skychx skychx Mar 6, 2022

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)

image

Copy link
Member

@SimenB SimenB Apr 4, 2022

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skychx wanna refresh this? the "syntactic sugar" thing was cleaned up in #13271

@github-actions
Copy link

github-actions bot commented Jul 3, 2022

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.

@github-actions github-actions bot added the Stale label Jul 3, 2022
@github-actions github-actions bot removed the Stale label Jul 15, 2022
@github-actions
Copy link

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.

@github-actions github-actions bot added Stale and removed Stale labels Oct 13, 2022
@github-actions
Copy link

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.

@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants