@@ -165,7 +165,7 @@ test('Modifying headers using Headers.prototype.set', () => {
165
165
} )
166
166
167
167
// https://github.com/nodejs/node/issues/43838
168
- test ( 'constructing a Response with a ReadableStream body' , { skip : process . version . startsWith ( 'v16.' ) } , async ( t ) => {
168
+ test ( 'constructing a Response with a ReadableStream body' , async ( t ) => {
169
169
const text = '{"foo":"bar"}'
170
170
const uint8 = new TextEncoder ( ) . encode ( text )
171
171
@@ -199,7 +199,7 @@ test('constructing a Response with a ReadableStream body', { skip: process.versi
199
199
await assert . rejects ( response . text ( ) , TypeError )
200
200
} )
201
201
202
- await t . test ( 'Readable with ArrayBuffer chunk still throws' , { skip : process . version . startsWith ( 'v16.' ) } , async ( ) => {
202
+ await t . test ( 'Readable with ArrayBuffer chunk still throws' , async ( ) => {
203
203
const readable = new ReadableStream ( {
204
204
start ( controller ) {
205
205
controller . enqueue ( uint8 . buffer )
@@ -210,14 +210,12 @@ test('constructing a Response with a ReadableStream body', { skip: process.versi
210
210
const response1 = new Response ( readable )
211
211
const response2 = response1 . clone ( )
212
212
const response3 = response1 . clone ( )
213
- // const response4 = response1.clone()
213
+ const response4 = response1 . clone ( )
214
214
215
215
await assert . rejects ( response1 . arrayBuffer ( ) , TypeError )
216
216
await assert . rejects ( response2 . text ( ) , TypeError )
217
217
await assert . rejects ( response3 . json ( ) , TypeError )
218
- // TODO: on Node v16.8.0, this throws a TypeError
219
- // because the body is detected as disturbed.
220
- // await t.rejects(response4.blob(), TypeError)
218
+ await assert . rejects ( response4 . blob ( ) , TypeError )
221
219
} )
222
220
} )
223
221
0 commit comments