diff --git a/jest.setup.js b/jest.setup.js index fea1bedec8..4a0291f63e 100644 --- a/jest.setup.js +++ b/jest.setup.js @@ -4,7 +4,8 @@ import '@testing-library/jest-dom'; // ReferenceError: ReadableStream is not defined in @loaders.gl/polyfills -global.ReadableStream = {}; +const {ReadableStream} = require('node:stream/web'); +globalThis.ReadableStream = ReadableStream; import {installFilePolyfills} from '@loaders.gl/polyfills'; installFilePolyfills();