Skip to content

Commit

Permalink
lib,test: enable wasm/webapi/empty-body WPT
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tniessen authored and RafaelGSS committed May 10, 2022
1 parent 41d2f6e commit c64b8d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 5 additions & 2 deletions lib/internal/bootstrap/pre_execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,11 @@ function setupFetch() {
}

// Pass all data from the response body to the WebAssembly compiler.
for await (const chunk of response.body) {
streamState.push(chunk);
const { body } = response;
if (body != null) {
for await (const chunk of body) {
streamState.push(chunk);
}
}
})().then(() => {
// No error occurred. Tell the implementation that the stream has ended.
Expand Down
3 changes: 0 additions & 3 deletions test/wpt/status/wasm/webapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
"contenttype.any.js": {
"skip": "WPTRunner does not support fetch()"
},
"empty-body.any.js": {
"skip": "Bug in undici, see https://github.com/nodejs/undici/issues/1345"
},
"idlharness.any.js": {
"skip": "not configured"
},
Expand Down

0 comments on commit c64b8d3

Please sign in to comment.