Skip to content

Conversation

@tinovyatkin
Copy link
Contributor

Summary

Fixes #6228 - adds URL and URLSearchParams that is attached to global since Node 10

global.setInterval = setInterval;
global.setTimeout = setTimeout;
// URL and URLSearchParams are global in Node >= 10
if(typeof URL !== 'undefined' && typeof URLSearchParams !== 'undefined') {
Copy link
Member

Choose a reason for hiding this comment

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

Mind fixing the linting error?

Needs to tell eslint to ignore globals. Potentially update globals package if it's within semver range (sindresorhus/globals@0a57eb5)

@codecov-io
Copy link

Codecov Report

Merging #6231 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #6231      +/-   ##
=========================================
+ Coverage   64.39%   64.4%   +<.01%     
=========================================
  Files         219     219              
  Lines        8456    8458       +2     
  Branches        4       4              
=========================================
+ Hits         5445    5447       +2     
  Misses       3010    3010              
  Partials        1       1
Impacted Files Coverage Δ
packages/jest-environment-node/src/index.js 78.78% <100%> (+1.36%) ⬆️

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 74892f0...6db40b9. Read the comment docs.

@SimenB
Copy link
Member

SimenB commented May 23, 2018

Bah, forgot to mention it, but can you add an entry to the changelog as well?

@cpojer cpojer merged commit 3705742 into jestjs:master May 23, 2018
@cpojer
Copy link
Member

cpojer commented May 23, 2018

I'll merge, we can add it to the changelog in a follow-up.

@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 12, 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-environment node removes new global URL object in Node 10.x

5 participants