Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-environment-jsdom

Package Overview
Dependencies
Maintainers
6
Versions
274
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-environment-jsdom - npm Package Compare versions

Comparing version 28.0.2 to 28.1.0

1

build/index.d.ts

@@ -26,2 +26,3 @@ /**

moduleMocker: ModuleMocker | null;
customExportConditions: string[];
constructor(config: JestEnvironmentConfig, context: EnvironmentContext);

@@ -28,0 +29,0 @@ setup(): Promise<void>;

@@ -61,2 +61,3 @@ 'use strict';

moduleMocker;
customExportConditions = ['browser'];

@@ -133,2 +134,17 @@ constructor(config, context) {

if ('customExportConditions' in projectConfig.testEnvironmentOptions) {
const {customExportConditions} = projectConfig.testEnvironmentOptions;
if (
Array.isArray(customExportConditions) &&
customExportConditions.every(item => typeof item === 'string')
) {
this.customExportConditions = customExportConditions;
} else {
throw new Error(
'Custom export conditions specified but they are not an array of strings'
);
}
}
this.moduleMocker = new (_jestMock().ModuleMocker)(global);

@@ -185,3 +201,3 @@ this.fakeTimers = new (_fakeTimers().LegacyFakeTimers)({

exportConditions() {
return ['browser'];
return this.customExportConditions;
}

@@ -188,0 +204,0 @@

16

package.json
{
"name": "jest-environment-jsdom",
"version": "28.0.2",
"version": "28.1.0",
"repository": {

@@ -20,13 +20,13 @@ "type": "git",

"dependencies": {
"@jest/environment": "^28.0.2",
"@jest/fake-timers": "^28.0.2",
"@jest/types": "^28.0.2",
"@jest/environment": "^28.1.0",
"@jest/fake-timers": "^28.1.0",
"@jest/types": "^28.1.0",
"@types/jsdom": "^16.2.4",
"@types/node": "*",
"jest-mock": "^28.0.2",
"jest-util": "^28.0.2",
"jest-mock": "^28.1.0",
"jest-util": "^28.1.0",
"jsdom": "^19.0.0"
},
"devDependencies": {
"@jest/test-utils": "^28.0.2"
"@jest/test-utils": "^28.1.0"
},

@@ -39,3 +39,3 @@ "engines": {

},
"gitHead": "279ee6658d763f024d51f340fab6a37c17d94502"
"gitHead": "f5db241312f46528389e55c38221e6b6968622cf"
}
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