mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 23:08:00 +01:00
14 lines
470 B
TypeScript
14 lines
470 B
TypeScript
|
import JSDOMEnvironment from 'jest-environment-jsdom';
|
||
|
|
||
|
export default class FixJSDOMEnvironment extends JSDOMEnvironment {
|
||
|
constructor(...args: ConstructorParameters<typeof JSDOMEnvironment>) {
|
||
|
super(...args);
|
||
|
|
||
|
// https://github.com/jsdom/jsdom/issues/1721#issuecomment-1484202038
|
||
|
// jsdom URL and Blob are missing most of the implementation
|
||
|
// Use the node version of these types instead
|
||
|
this.global.URL = URL;
|
||
|
this.global.Blob = Blob;
|
||
|
}
|
||
|
}
|