From b5b1604924674f66af7f7087fc92e69da48bf9de Mon Sep 17 00:00:00 2001 From: Erik Huelsmann Date: Fri, 27 Dec 2024 10:33:30 +0100 Subject: [PATCH] Add MessagePort to test environment for 'Undici' v7 --- UI/tests/common/jest.polyfills.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UI/tests/common/jest.polyfills.js b/UI/tests/common/jest.polyfills.js index 99c431bc3d..5f88045a59 100644 --- a/UI/tests/common/jest.polyfills.js +++ b/UI/tests/common/jest.polyfills.js @@ -3,9 +3,12 @@ const { TextEncoder, TextDecoder } = require("node:util"); const { ReadableStream, TransformStream } = require("node:stream/web"); +const { MessageChannel, MessagePort } = require("node:worker_threads"); const { performance } = require("node:perf_hooks"); Object.defineProperties(globalThis, { + MessageChannel: { value: MessageChannel }, + MessagePort: { value: MessagePort }, ReadableStream: { value: ReadableStream }, TextDecoder: { value: TextDecoder }, TextEncoder: { value: TextEncoder },