Skip to content

Commit ea23a10

Browse files
committed
frontend: Add mock Worker to tests
1 parent a0a5d43 commit ea23a10

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

frontend/src/setupTests.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ if (typeof ResizeObserver === 'undefined' && typeof require !== 'undefined') {
3030
(global as any).ResizeObserver = require('resize-observer-polyfill');
3131
}
3232

33+
globalThis.Worker = class {
34+
postMessage() {}
35+
} as any;
36+
3337
if (globalThis.window) {
3438
Object.defineProperty(window, 'matchMedia', {
3539
writable: true,

0 commit comments

Comments
 (0)