From b19ddb4116a98f9c5559e6397f2f5728b4b7d561 Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Fri, 8 Mar 2024 11:53:24 +0000 Subject: [PATCH] fix fastboot for ember-data --- tests/dummy/config/fastboot.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/dummy/config/fastboot.js 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, + }); + }, + }; +};