jest-environment-jsdom 29.5.0 → 29.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.d.ts +1 -0
- package/build/index.js +5 -2
- package/package.json +8 -8
package/build/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ declare class JSDOMEnvironment implements JestEnvironment<number> {
|
|
|
24
24
|
private errorEventListener;
|
|
25
25
|
moduleMocker: ModuleMocker | null;
|
|
26
26
|
customExportConditions: string[];
|
|
27
|
+
private _configuredExportConditions?;
|
|
27
28
|
constructor(config: JestEnvironmentConfig, context: EnvironmentContext);
|
|
28
29
|
setup(): Promise<void>;
|
|
29
30
|
teardown(): Promise<void>;
|
package/build/index.js
CHANGED
|
@@ -39,6 +39,8 @@ function _jestUtil() {
|
|
|
39
39
|
* LICENSE file in the root directory of this source tree.
|
|
40
40
|
*/
|
|
41
41
|
|
|
42
|
+
// The `Window` interface does not have an `Error.stackTraceLimit` property, but
|
|
43
|
+
// `JSDOMEnvironment` assumes it is there.
|
|
42
44
|
function isString(value) {
|
|
43
45
|
return typeof value === 'string';
|
|
44
46
|
}
|
|
@@ -50,6 +52,7 @@ class JSDOMEnvironment {
|
|
|
50
52
|
errorEventListener;
|
|
51
53
|
moduleMocker;
|
|
52
54
|
customExportConditions = ['browser'];
|
|
55
|
+
_configuredExportConditions;
|
|
53
56
|
constructor(config, context) {
|
|
54
57
|
const {projectConfig} = config;
|
|
55
58
|
const virtualConsole = new (_jsdom().VirtualConsole)();
|
|
@@ -124,7 +127,7 @@ class JSDOMEnvironment {
|
|
|
124
127
|
Array.isArray(customExportConditions) &&
|
|
125
128
|
customExportConditions.every(isString)
|
|
126
129
|
) {
|
|
127
|
-
this.
|
|
130
|
+
this._configuredExportConditions = customExportConditions;
|
|
128
131
|
} else {
|
|
129
132
|
throw new Error(
|
|
130
133
|
'Custom export conditions specified but they are not an array of strings'
|
|
@@ -170,7 +173,7 @@ class JSDOMEnvironment {
|
|
|
170
173
|
this.fakeTimersModern = null;
|
|
171
174
|
}
|
|
172
175
|
exportConditions() {
|
|
173
|
-
return this.customExportConditions;
|
|
176
|
+
return this._configuredExportConditions ?? this.customExportConditions;
|
|
174
177
|
}
|
|
175
178
|
getVmContext() {
|
|
176
179
|
if (this.dom) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jest-environment-jsdom",
|
|
3
|
-
"version": "29.
|
|
3
|
+
"version": "29.6.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/facebook/jest.git",
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
"./package.json": "./package.json"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@jest/environment": "^29.
|
|
21
|
-
"@jest/fake-timers": "^29.
|
|
22
|
-
"@jest/types": "^29.
|
|
20
|
+
"@jest/environment": "^29.6.1",
|
|
21
|
+
"@jest/fake-timers": "^29.6.1",
|
|
22
|
+
"@jest/types": "^29.6.1",
|
|
23
23
|
"@types/jsdom": "^20.0.0",
|
|
24
24
|
"@types/node": "*",
|
|
25
|
-
"jest-mock": "^29.
|
|
26
|
-
"jest-util": "^29.
|
|
25
|
+
"jest-mock": "^29.6.1",
|
|
26
|
+
"jest-util": "^29.6.1",
|
|
27
27
|
"jsdom": "^20.0.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@jest/test-utils": "^29.
|
|
30
|
+
"@jest/test-utils": "^29.6.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"canvas": "^2.5.0"
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "1f019afdcdfc54a6664908bb45f343db4e3d0848"
|
|
47
47
|
}
|