It seems that the official guide about MockingFunctionssection doesn't show the latest doc updates.
The example code in the official guide show this code now, which is weired.

In your repo, the latest docs shows proper example.

anyway, they don't match together. The official guide should be updated like the docs in your repo.
Steps to reproduce the behavior:
mocking functions section of the official guideThe example on the official guide should be updated to latest one.
That's because we use versioned docs, the updated versions is at https://jestjs.io/docs/en/next/mock-functions#mock-implementations
Feel free to send a PR making https://github.com/facebook/jest/blob/c01b4c75a2f65e9fa122adf69b0ac11875f1fc74/docs/MockFunctions.md#mock-implementations and https://github.com/facebook/jest/blob/master/website/versioned_docs/version-23.6/MockFunctions.md#mock-implementations match
Yeah, otherwise they'll get sync'd back up when we cut the next release
Oh I didn't know that you're using versioned docs. I understood, Thanks!
Most helpful comment
That's because we use versioned docs, the updated versions is at https://jestjs.io/docs/en/next/mock-functions#mock-implementations
Feel free to send a PR making https://github.com/facebook/jest/blob/c01b4c75a2f65e9fa122adf69b0ac11875f1fc74/docs/MockFunctions.md#mock-implementations and https://github.com/facebook/jest/blob/master/website/versioned_docs/version-23.6/MockFunctions.md#mock-implementations match