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

Clean mock interface with support for mock reset and mock clear #10

Open
teunmooij opened this issue Jan 14, 2023 · 0 comments
Open

Clean mock interface with support for mock reset and mock clear #10

teunmooij opened this issue Jan 14, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@teunmooij
Copy link
Owner

Description

nest mocks' type definitions suggest that they're full mocks, but changing the implementation and resets remove all nesting capabilities.
Therefore:

  • type definition must pick from jest.Mock only the properties that are actually supported
  • mockClear must restore the mock, with the given implementation
  • mockReset must reset the mocks, removing their implementations
  • it would also be nice to have logical implementations for other mock properties, like mockReturnValue
@teunmooij teunmooij added the enhancement New feature or request label Jan 14, 2023
@teunmooij teunmooij self-assigned this Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant