This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree 2 files changed +4
-7
lines changed
2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 59
59
"uint8arrays" : " ^2.1.6"
60
60
},
61
61
"devDependencies" : {
62
+ "@web-std/blob" : " ^2.1.1" ,
62
63
"@web-std/file" : " ^1.1.0" ,
63
64
"aegir" : " ^34.0.2" ,
64
65
"rimraf" : " ^3.0.2"
Original file line number Diff line number Diff line change @@ -6,8 +6,9 @@ const { expect } = require('aegir/utils/chai')
6
6
const blobToIt = require ( 'blob-to-it' )
7
7
const uint8ArrayFromString = require ( 'uint8arrays/from-string' )
8
8
const all = require ( 'it-all' )
9
+ const { Blob } = require ( '@web-std/blob' )
9
10
const { File } = require ( '@web-std/file' )
10
- const { Blob , ReadableStream } = globalThis
11
+ const { ReadableStream } = globalThis
11
12
const { isBrowser, isWebWorker, isElectronRenderer } = require ( 'ipfs-utils/src/env' )
12
13
13
14
let normalise = require ( '../../src/files/normalise-input' )
@@ -36,12 +37,7 @@ async function verifyNormalisation (input) {
36
37
let content = input [ 0 ] . content
37
38
38
39
if ( isBrowser || isWebWorker || isElectronRenderer ) {
39
- try {
40
- expect ( content ) . to . be . an . instanceOf ( Blob )
41
- } catch ( err ) {
42
- // Fallback to instance of File
43
- expect ( content ) . to . be . an . instanceOf ( File )
44
- }
40
+ expect ( content ) . to . be . an . instanceOf ( Blob )
45
41
content = blobToIt ( content )
46
42
}
47
43
You can’t perform that action at this time.
0 commit comments