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

@happy-dom/jest-environment

Package Overview
Dependencies
Maintainers
1
Versions
558
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@happy-dom/jest-environment - npm Package Compare versions

Comparing version 2.20.1 to 2.21.0

7

lib/index.js

@@ -78,3 +78,2 @@ "use strict";

function HappyDOMEnvironment(config, options) {
if (options === void 0) { options = {}; }
this.fakeTimers = null;

@@ -89,2 +88,6 @@ this.fakeTimersModern = null;

this.global.Error.stackTraceLimit = 100;
// TODO: Remove this ASAP as it currently causes tests to run really slow.
this.global.Buffer = Buffer;
// Needed as Jest is using it
this.global.global = this.global;
JestUtil.installCommonGlobals(this.global, config.globals);

@@ -94,3 +97,3 @@ // Removes window.fetch() as it should not be used in a test environment.

delete this.global.window['fetch'];
if (options.console) {
if (options && options.console) {
this.global.console = options.console;

@@ -97,0 +100,0 @@ this.global.window['console'] = options.console;

{
"name": "@happy-dom/jest-environment",
"version": "2.20.1",
"version": "2.21.0",
"license": "MIT",

@@ -53,8 +53,8 @@ "homepage": "https://github.com/capricorn86/happy-dom/tree/master/packages/jest-environment",

"dependencies": {
"@jest/environment": "^26.6.2",
"@jest/fake-timers": "^26.6.2",
"@jest/types": "^26.6.2",
"happy-dom": "^2.20.1",
"jest-mock": "^26.6.2",
"jest-util": "^26.6.2"
"@jest/environment": "^27.0.3",
"@jest/fake-timers": "^27.0.3",
"@jest/types": "^27.0.2",
"happy-dom": "^2.21.0",
"jest-mock": "^27.0.3",
"jest-util": "^27.0.2"
},

@@ -79,3 +79,3 @@ "devDependencies": {

"eslint-plugin-prettier": "^3.4.0",
"jest": "^26.6.3",
"jest": "^27.0.4",
"jquery": "^3.5.1",

@@ -86,3 +86,3 @@ "lit-element": "^2.4.0",

"react-dom": "^16.13.1",
"ts-jest": "^26.5.6",
"ts-jest": "^27.0.3",
"typescript": "^4.2.4",

@@ -92,3 +92,3 @@ "vue": "^2.6.12",

},
"gitHead": "677f1705df2cedcd5852bc721b07053be1b403c4"
"gitHead": "cf68a99486818304511ab14facadc8a0fad2139a"
}

@@ -27,3 +27,3 @@ /* eslint-disable filenames/match-exported */

*/
constructor(config: Config.ProjectConfig, options: EnvironmentContext = {}) {
constructor(config: Config.ProjectConfig, options?: EnvironmentContext) {
VM.createContext(this.global);

@@ -37,2 +37,8 @@

// TODO: Remove this ASAP as it currently causes tests to run really slow.
this.global.Buffer = Buffer;
// Needed as Jest is using it
this.global.global = this.global;
JestUtil.installCommonGlobals(this.global, config.globals);

@@ -44,3 +50,3 @@

if (options.console) {
if (options && options.console) {
this.global.console = options.console;

@@ -47,0 +53,0 @@ this.global.window['console'] = options.console;

Sorry, the diff of this file is not supported yet

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