Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / packages / jest-env / index.js
blob071ac5b807082d565558d3d59d79af5cbf5bb9e4
1 // Stolen from: https://github.com/ipfs/jest-environment-aegir/blob/master/src/index.js
2 // Overcomes error from jest internals.. this thing: https://github.com/facebook/jest/issues/6248
3 // Mostly needed for making OpenPGP.js works
5 const JSDOMEnvironment = require('jest-environment-jsdom').default;
7 class MyEnvironment extends JSDOMEnvironment {
8 constructor({ globalConfig, projectConfig }, context) {
9 super(
11 globalConfig,
12 projectConfig: {
13 ...projectConfig,
14 globals: {
15 ...projectConfig.globals,
16 Uint32Array,
17 Uint8Array,
18 ArrayBuffer,
19 TextDecoder,
20 TextEncoder,
21 ReadableStream,
22 Response,
23 Request,
24 BroadcastChannel,
25 TransformStream,
26 fetch,
27 structuredClone,
31 context
35 async setup() {} // eslint-disable-line
37 async teardown() {} // eslint-disable-line
40 module.exports = MyEnvironment;