New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jest-environment-node

Package Overview
Dependencies
Maintainers
5
Versions
275
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-environment-node - npm Package Compare versions

Comparing version 16.0.2 to 16.1.0-alpha.691b0e22

19

build/index.js

@@ -21,4 +21,2 @@ /**

const isNaN = global.isNaN;
class NodeEnvironment {

@@ -30,14 +28,13 @@

constructor(config) {
const global = this.global = {};
vm.createContext(this.global);
this.context = vm.createContext();
const global = this.global = vm.runInContext('this', this.context);
global.global = global;
global.clearInterval = clearInterval;
global.clearTimeout = clearTimeout;
global.JSON = JSON;
global.Promise = Promise;
global.setInterval = setInterval;
global.setTimeout = setTimeout;
global.isNaN = isNaN;
global.ArrayBuffer = ArrayBuffer;
global.JSON = JSON;
global.Promise = Promise;
installCommonGlobals(global, config.globals);

@@ -52,3 +49,3 @@ this.moduleMocker = new ModuleMocker();

}
this.global = null;
this.context = null;
this.fakeTimers = null;

@@ -58,4 +55,4 @@ }

runScript(script) {
if (this.global) {
return script.runInContext(this.global);
if (this.context) {
return script.runInContext(this.context);
}

@@ -62,0 +59,0 @@ return null;

{
"name": "jest-environment-node",
"version": "16.0.2",
"version": "16.1.0-alpha.691b0e22",
"repository": {

@@ -11,4 +11,4 @@ "type": "git",

"dependencies": {
"jest-mock": "^16.0.2",
"jest-util": "^16.0.2"
"jest-mock": "^16.1.0-alpha.691b0e22",
"jest-util": "^16.1.0-alpha.691b0e22"
},

@@ -15,0 +15,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc