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

Make useRealTimers play well with timers: fake #3858

Merged
merged 1 commit into from
Jun 21, 2017

Conversation

thymikee
Copy link
Collaborator

Summary

We unnecessarily call useFakeTimers on every beforeEach, even though it's only needed when combined with resetMocks.
Fixes #3815

Test plan

Added an integration test.

@codecov-io
Copy link

Codecov Report

Merging #3858 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3858      +/-   ##
==========================================
- Coverage   57.63%   57.62%   -0.02%     
==========================================
  Files         194      194              
  Lines        6782     6784       +2     
  Branches        6        6              
==========================================
  Hits         3909     3909              
- Misses       2870     2872       +2     
  Partials        3        3
Impacted Files Coverage Δ
packages/jest-jasmine2/src/index.js 0% <0%> (ø) ⬆️
packages/jest-cli/src/TestRunner.js 25.3% <0%> (ø) ⬆️
packages/jest-cli/src/reporters/SummaryReporter.js 22.58% <0%> (ø) ⬆️

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 3701b13...0b09a4f. Read the comment docs.

@rogeliog
Copy link
Contributor

Does it also fix #3814?

@thymikee
Copy link
Collaborator Author

Haven't tried, but it seems like a node 7.4 issue. It works on every other version

@aaronabramov aaronabramov merged commit 1e8f282 into jestjs:master Jun 21, 2017
tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
@thymikee thymikee deleted the fix-useRealTimers branch March 16, 2019 10:55
@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.

jest.useRealTimers() has no effect
5 participants