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

Update mockReturnValue documentation #3993

Merged
merged 1 commit into from
Jul 10, 2017
Merged

Update mockReturnValue documentation #3993

merged 1 commit into from
Jul 10, 2017

Conversation

jwbay
Copy link
Contributor

@jwbay jwbay commented Jul 8, 2017

Summary

  • Un-deprecates mockReturnValue (fixes docs question - mockReturnValue deprecated? #3961) and describes its usage in terms of changing the
    return value of an existing mock. This was marked as deprecated for Jest 0.9.0 over a year ago, but I wasn't able to find any other mention of it. If mockReturnValue and mockReturnValueOnce are actually deprecated, I can switch the documentation to point to mockImplementation and mockImplementationOnce as replacements since they're closer analogues.
  • Document mockReturnValueOnce with usage example instead of implementation

Test plan

image

@codecov-io
Copy link

Codecov Report

Merging #3993 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3993   +/-   ##
=======================================
  Coverage   60.26%   60.26%           
=======================================
  Files         196      196           
  Lines        6765     6765           
  Branches        6        6           
=======================================
  Hits         4077     4077           
  Misses       2685     2685           
  Partials        3        3

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 d923293...cdf5748. Read the comment docs.

@cpojer cpojer merged commit 487ab1d into jestjs:master Jul 10, 2017
@jwbay jwbay deleted the mock-docs branch July 10, 2017 22:45
tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
@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 13, 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.

docs question - mockReturnValue deprecated?
4 participants