12345678910111213141516171819202122232425 |
- diff --git a/build/index.js b/build/index.js
- index ec8a133f3fbea56f4b395c96ca2b27bd4903c62e..dfd3852248f5008f82794ce61e3dca10ee8f8389 100644
- --- a/build/index.js
- +++ b/build/index.js
- @@ -49,7 +49,7 @@ class JSDOMEnvironment {
- global;
- errorEventListener;
- moduleMocker;
- - customExportConditions = ['browser'];
- + customExportConditions = ['jest','browser'];
- constructor(config, context) {
- const {projectConfig} = config;
- const virtualConsole = new (_jsdom().VirtualConsole)();
- @@ -93,6 +93,11 @@ class JSDOMEnvironment {
- // TODO: remove this ASAP, but it currently causes tests to run really slow
- global.Buffer = Buffer;
-
- + // JSDOM does not provide the following, thankfully Node.js ships with spec-compliant equivalent:
- + global.TextDecoder = TextDecoder;
- + global.TextEncoder = TextEncoder;
- + Object.defineProperty(global, 'crypto', {__proto__:null, value:require('node:crypto').webcrypto});
- +
- // Report uncaught errors.
- this.errorEventListener = event => {
- if (userErrorListenerCount === 0 && event.error != null) {
|