diff --git a/tests/dummy/config/fastboot.js b/tests/dummy/config/fastboot.js new file mode 100644 index 0000000..dc9ea36 --- /dev/null +++ b/tests/dummy/config/fastboot.js @@ -0,0 +1,22 @@ +module.exports = function () { + return { + buildSandboxGlobals(defaultGlobals) { + return Object.assign({}, defaultGlobals, { + AbortController, + ReadableStream: + typeof ReadableStream !== 'undefined' + ? ReadableStream + : require('node:stream/web').ReadableStream, + WritableStream: + typeof WritableStream !== 'undefined' + ? WritableStream + : require('node:stream/web').WritableStream, + TransformStream: + typeof TransformStream !== 'undefined' + ? TransformStream + : require('node:stream/web').TransformStream, + Headers: typeof Headers !== 'undefined' ? Headers : undefined, + }); + }, + }; +};