Skip to content

Commit c64b8d3

Browse files
tniessenRafaelGSS
authored andcommitted
lib,test: enable wasm/webapi/empty-body WPT
Refs: #42701 Refs: nodejs/undici#1346 Refs: #42939 PR-URL: #42960 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent 41d2f6e commit c64b8d3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/internal/bootstrap/pre_execution.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,11 @@ function setupFetch() {
250250
}
251251

252252
// Pass all data from the response body to the WebAssembly compiler.
253-
for await (const chunk of response.body) {
254-
streamState.push(chunk);
253+
const { body } = response;
254+
if (body != null) {
255+
for await (const chunk of body) {
256+
streamState.push(chunk);
257+
}
255258
}
256259
})().then(() => {
257260
// No error occurred. Tell the implementation that the stream has ended.

test/wpt/status/wasm/webapi.json

-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
"contenttype.any.js": {
1313
"skip": "WPTRunner does not support fetch()"
1414
},
15-
"empty-body.any.js": {
16-
"skip": "Bug in undici, see https://github.com/nodejs/undici/issues/1345"
17-
},
1815
"idlharness.any.js": {
1916
"skip": "not configured"
2017
},

0 commit comments

Comments
 (0)