Skip to content

feat(@jest/globals): add jest.Mock type helper#13235

Merged
SimenB merged 2 commits intojestjs:mainfrom
mrazauskas:feat-add-jest.Mock
Sep 9, 2022
Merged

feat(@jest/globals): add jest.Mock type helper#13235
SimenB merged 2 commits intojestjs:mainfrom
mrazauskas:feat-add-jest.Mock

Conversation

@mrazauskas
Copy link
Copy Markdown
Contributor

Summary

Let’s add Mock type helper to jest namespace. The example of jest.Mock usage in docs is inspired by this test:

https://github.com/facebook/jest/blob/448eed8de9c2226dcc824573a5f859f7c06e6f4c/packages/expect/src/__tests__/spyMatchers.test.ts#L653-L656

Test plan

The Mock type already has extensive test in jest-mock package. So I added just a minimal test to make sure it is exposed in the namespace.

@SimenB SimenB merged commit 0b0a54f into jestjs:main Sep 9, 2022
@mrazauskas mrazauskas deleted the feat-add-jest.Mock branch September 10, 2022 03:50
@SimenB
Copy link
Copy Markdown
Member

SimenB commented Sep 10, 2022

@github-actions
Copy link
Copy Markdown

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 Oct 11, 2022
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.

3 participants