We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a2e008 commit 9384fa2Copy full SHA for 9384fa2
1 file changed
test-setup.ts
@@ -14,4 +14,18 @@ if (!Element.prototype.scrollTo) {
14
(Element.prototype as any).scrollTo = function () {};
15
}
16
17
+if (!URL.createObjectURL) {
18
+ let counter = 0;
19
+ const objectURLs = new Map<string, string>();
20
+ (URL as any).createObjectURL = function (blob: Blob): string {
21
+ const id = `blob:${++counter}`;
22
+ const url = `blob:${id}`;
23
+ objectURLs.set(url, blob as any);
24
+ return url;
25
+ };
26
+ (URL as any).revokeObjectURL = function (url: string): void {
27
+ objectURLs.delete(url);
28
29
+}
30
+
31
setupTestBed();
0 commit comments