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

chore: rename LolexFakeTimers to ModernFakeTimers #9960

Merged
merged 1 commit into from
May 3, 2020

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented May 3, 2020

Summary

Prerequisite for #7776. This was never documented, so not a huge breaking change, it's just a rename of the export from @jest/fake-timers and of the property on the environments. I've also migrated from lolex to its new name @sinonjs/fake-timers. Way more boring name, but it's descriptive so whatever 😛

Test plan

Tests tweaked.

@@ -18,12 +18,13 @@
- `[*]` [**BREAKING**] Drop support for Node 8 ([#9423](https://github.com/facebook/jest/pull/9423))
- `[*]` Upgrade to chalk@4 ([#9752](https://github.com/facebook/jest/pull/9752))
- `[*]` Remove usage of `realpath-native` ([#9952](https://github.com/facebook/jest/pull/9952))
- `[jest-runtime]` [**BREAKING**] Remove long-deprecated `require.requireActual` and `require.requireMock` methods ([#9854](https://github.com/facebook/jest/pull/9854))
Copy link
Member Author

Choose a reason for hiding this comment

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

new is on line 25, I just sorted the entries

@@ -24,7 +21,7 @@ type Timer = {
class NodeEnvironment implements JestEnvironment {
context: Context | null;
fakeTimers: LegacyFakeTimers<Timer> | null;
Copy link
Member Author

Choose a reason for hiding this comment

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

could rename this to legacyFakeTimers, not sure it's worth the churn for custom envs, tho?

@codecov-io
Copy link

Codecov Report

Merging #9960 into master will not change coverage.
The diff coverage is 45.45%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9960   +/-   ##
=======================================
  Coverage   64.06%   64.06%           
=======================================
  Files         293      293           
  Lines       12457    12457           
  Branches     3067     3069    +2     
=======================================
  Hits         7981     7981           
  Misses       3833     3833           
  Partials      643      643           
Impacted Files Coverage Δ
packages/jest-fake-timers/src/legacyFakeTimers.ts 90.35% <ø> (ø)
packages/jest-environment-jsdom/src/index.ts 38.00% <25.00%> (ø)
packages/jest-environment-node/src/index.ts 56.41% <25.00%> (ø)
packages/jest-fake-timers/src/modernFakeTimers.ts 69.76% <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 5a16415...4ceaae0. Read the comment docs.

@SimenB SimenB merged commit d7f3427 into jestjs:master May 3, 2020
@SimenB SimenB deleted the lolex-to-sinon branch May 3, 2020 15:23
@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.

3 participants