Skip to content

Conversation

Uzwername
Copy link
Contributor

@Uzwername Uzwername commented Mar 28, 2020

Added a new matcher .toHaveBeenCalledOnce

#138

Notes

Housekeeping

  • [ x ] Unit tests
  • [ x ] Documentation is up to date
  • [ x ] No additional lint warnings
  • [ x ] Typescript definitions are added/updated where relevant

@codecov-io
Copy link

codecov-io commented Mar 28, 2020

Codecov Report

Merging #274 (063b7a6) into main (d5dd8f1) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #274   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          125       127    +2     
  Lines          792       806   +14     
  Branches       124       126    +2     
=========================================
+ Hits           792       806   +14     
Impacted Files Coverage Δ
src/matchers/index.js 100.00% <100.00%> (ø)
src/matchers/toHaveBeenCalledOnce/index.js 100.00% <100.00%> (ø)
src/matchers/toHaveBeenCalledOnce/predicate.js 100.00% <100.00%> (ø)

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 d5dd8f1...063b7a6. Read the comment docs.

@@ -0,0 +1 @@
export default mockFn => mockFn.mock.calls.length === 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should also verify mockFn is actually a mock function

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@SimenB SimenB merged commit 405f1e7 into jest-community:main Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants