Skip to content

Commit

Permalink
Types
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Dec 12, 2022
1 parent b6d6bd9 commit 8e763be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils/postMessage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@
*/

import { sleep } from "@/utils";
import { MessageChannel, MessagePort } from "node:worker_threads";
import polyfill from "node:worker_threads";
import { serializeError } from "serialize-error";
import postMessage, {
addPostMessageListener,
type RequestPacket,
} from "./postMessage";

(global as any).MessageChannel = MessageChannel;
(global as any).MessageChannel = polyfill.MessageChannel;
(global as any).MessagePort = polyfill.MessagePort;

afterEach(jest.restoreAllMocks);

Expand Down

0 comments on commit 8e763be

Please sign in to comment.