diff --git a/tests/setup-env.js b/tests/setup-env.js index c9b976f5..1a4401de 100644 --- a/tests/setup-env.js +++ b/tests/setup-env.js @@ -1,5 +1,9 @@ import '@testing-library/jest-dom/extend-expect' import './failOnUnexpectedConsoleCalls' import {TextEncoder} from 'util' +import {MessageChannel} from 'worker_threads' global.TextEncoder = TextEncoder +// TODO: Revisit once https://github.com/jsdom/jsdom/issues/2448 is resolved +// This isn't perfect but good enough. +global.MessageChannel = MessageChannel