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

Support mocking constructor in mockImplementationOnce #4599

Merged
merged 2 commits into from Oct 4, 2017

Conversation

thymikee
Copy link
Collaborator

@thymikee thymikee commented Oct 4, 2017

Summary

Mocking constructor wasn't supported inside mockImplementationOnce.
Fixes #4595.

Test plan

Added a test with mocking constructor.

@codecov-io
Copy link

Codecov Report

Merging #4599 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4599      +/-   ##
==========================================
+ Coverage   56.16%   56.17%   +<.01%     
==========================================
  Files         194      194              
  Lines        6543     6544       +1     
  Branches        3        3              
==========================================
+ Hits         3675     3676       +1     
  Misses       2867     2867              
  Partials        1        1
Impacted Files Coverage Δ
packages/jest-mock/src/index.js 84.96% <100%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d175f39...af518bb. Read the comment docs.

@cpojer
Copy link
Member

cpojer commented Oct 4, 2017

Good fix! Thanks.

@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 May 11, 2021
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.

mockImplementationOnce doesn't mock constructor, mockImplementation does
4 participants