Skip to content

Commit

Permalink
Add MessagePort to test environment for 'Undici' v7
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuelsmann committed Dec 27, 2024
1 parent 60aaad6 commit b5b1604
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions UI/tests/common/jest.polyfills.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down

0 comments on commit b5b1604

Please # to comment.