-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathIx.ts
23 lines (19 loc) · 845 Bytes
/
Ix.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import 'web-streams-polyfill';
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only.js';
// import this before assigning window global since it does a `typeof window` check
// eslint-disable-next-line @typescript-eslint/no-require-imports
// require('web-stream-tools');
import '@openpgp/web-stream-tools';
(<any>global).window = (<any>global).window || global;
// Fix for Jest in node v10.x
Object.defineProperty(ArrayBuffer, Symbol.hasInstance, {
writable: true,
configurable: true,
value(inst: any) {
return inst && inst.constructor && inst.constructor.name === 'ArrayBuffer';
},
});
// Require rxjs first so we pick up its polyfilled Symbol.observable
// eslint-disable-next-line @typescript-eslint/no-require-imports
// require('rxjs/internal/symbol/observable');
import 'rxjs/internal/symbol/observable.js';