philomena/assets/fix-jsdom.ts
Chaska d3a1b1f1c0 Revert "Merge pull request #4 from philomena-dev/master"
This reverts commit 42d87937eb, reversing
changes made to 2cd8830191.

merp
2024-05-01 00:52:05 -05:00

13 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;
}
}