@@ -198,6 +198,8 @@ assert.throws(() => new Blob({}), {
198
198
const b = new Blob ( ) ;
199
199
assert . strictEqual ( inspect ( b , { depth : null } ) ,
200
200
'Blob { size: 0, type: \'\' }' ) ;
201
+ assert . strictEqual ( inspect ( b , { depth : 1 } ) ,
202
+ 'Blob { size: 0, type: \'\' }' ) ;
201
203
assert . strictEqual ( inspect ( b , { depth : - 1 } ) , '[Blob]' ) ;
202
204
}
203
205
@@ -230,6 +232,30 @@ assert.throws(() => new Blob({}), {
230
232
} ) ;
231
233
}
232
234
235
+ {
236
+ assert . throws ( ( ) => Reflect . get ( Blob . prototype , 'type' , { } ) , {
237
+ code : 'ERR_INVALID_THIS' ,
238
+ } ) ;
239
+ assert . throws ( ( ) => Reflect . get ( Blob . prototype , 'size' , { } ) , {
240
+ code : 'ERR_INVALID_THIS' ,
241
+ } ) ;
242
+ assert . throws ( ( ) => Blob . prototype . slice ( Blob . prototype , 0 , 1 ) , {
243
+ code : 'ERR_INVALID_THIS' ,
244
+ } ) ;
245
+ assert . throws ( ( ) => Blob . prototype . stream . call ( ) , {
246
+ code : 'ERR_INVALID_THIS' ,
247
+ } ) ;
248
+ }
249
+
250
+ ( async ( ) => {
251
+ assert . rejects ( async ( ) => Blob . prototype . arrayBuffer . call ( ) , {
252
+ code : 'ERR_INVALID_THIS' ,
253
+ } ) ;
254
+ assert . rejects ( async ( ) => Blob . prototype . text . call ( ) , {
255
+ code : 'ERR_INVALID_THIS' ,
256
+ } ) ;
257
+ } ) ( ) . then ( common . mustCall ( ) ) ;
258
+
233
259
( async ( ) => {
234
260
const blob = new Blob ( [
235
261
new Uint8Array ( [ 0x50 , 0x41 , 0x53 , 0x53 ] ) ,
0 commit comments