Skip to content

Commit 96b05c2

Browse files
committed
test: support node.js 16
1 parent 4da0d89 commit 96b05c2

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

package-lock.json

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"rimraf": "=5.0.5",
103103
"source-map-explorer": "^2.5.3",
104104
"terser-webpack-plugin": "^5.0.3",
105-
"undici": "^6.6.2",
105+
"undici": "^5.28.3",
106106
"webpack": "=5.90.3",
107107
"webpack-bundle-size-analyzer": "=3.1.0",
108108
"webpack-cli": "=5.1.4",

test/jest.setup.js

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import process from 'node:process';
33
import http from 'node:http';
44
import path from 'node:path';
55
import fs from 'node:fs';
6+
import { ReadableStream } from 'node:stream/web';
67
import { fetch, Headers, Request, Response, FormData, File } from 'undici';
78

89
// force using undici for testing
@@ -13,6 +14,7 @@ globalThis.Response = Response;
1314
globalThis.FormData = FormData;
1415
globalThis.File = File;
1516
globalThis.Blob = Blob;
17+
globalThis.ReadableStream = ReadableStream;
1618

1719
// helpers for reading local files
1820
globalThis.loadFile = (uri) => fs.readFileSync(uri).toString();

0 commit comments

Comments
 (0)