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

Change implementation of toHaveBeenCalledBefore to use invocationCallOrder #132

Merged
merged 1 commit into from
Jun 11, 2018

Conversation

blikblum
Copy link
Contributor

@blikblum blikblum commented May 27, 2018

What

Change implementation of toHaveBeenCalledBefore to use mock.invocationCallOrder instead of mock.timestamps

Fixes #131

Why

  1. Jest 23 removed mock.timestamps making the current implementation incompatible to it
  2. It removes the limitation of toHaveBeenCalledBefore not being accurate when functions are called in the same tick/task

Housekeeping

  • Unit tests
  • Documentation is up to date
  • No additional lint warnings
  • Add yourself to contributors list (yarn contributor)
  • Typescript definitions are added/updated where relevant

@codecov-io
Copy link

Codecov Report

Merging #132 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #132   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          90     90           
  Lines         425    425           
  Branches       70     70           
=====================================
  Hits          425    425
Impacted Files Coverage Δ
src/matchers/toHaveBeenCalledBefore/predicate.js 100% <100%> (ø) ⬆️
src/matchers/toHaveBeenCalledBefore/index.js 100% <100%> (ø) ⬆️

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 aee660b...dcdcbfd. Read the comment docs.

@mattphillips
Copy link
Member

Nice one @blikblum this looks great thanks for fixing this 😄

@mattphillips mattphillips merged commit bb94682 into jest-community:master Jun 11, 2018
@blikblum blikblum deleted the called-before-v23 branch June 11, 2018 10:20
@benjaminkay93
Copy link
Contributor

Hey, any idea when this will be published? 🙃
It would be great to have this just so I can transition to jest v23 as I have some it.each test's sat on a branch waiting for this, no rush as I have those test's written out as a 1 by 1 run so it's just a code clean up, it is just a nice to have to have an idea of when it'll be released :)
Thanks in advanced 😃

@mattphillips
Copy link
Member

Hey @benjaminkay93 this fix has been released today in v0.8.0 sorry for the delay!

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