Skip to content

Commit c43609c

Browse files
committed
Type empty array before pushing to it
1 parent 0c5f794 commit c43609c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/miniflare/freeway.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import { Builder, toBlobKey } from '../helpers/builder.js'
1313
import { generateBlockLocationClaims, mockClaimsService, generateLocationClaim } from '../helpers/content-claims.js'
1414
import { mockBucketService } from '../helpers/bucket.js'
1515

16+
/** @import { Block, Position } from 'carstream' */
17+
1618
/**
1719
* @param {{ arrayBuffer: () => Promise<ArrayBuffer> }} a
1820
* @param {{ arrayBuffer: () => Promise<ArrayBuffer> }} b
@@ -163,6 +165,7 @@ describe('freeway', () => {
163165
const source = /** @type {ReadableStream<Uint8Array>} */ (res.body)
164166
const carStream = new CARReaderStream()
165167

168+
/** @type {(Block & Position)[]} */
166169
const blocks = []
167170
await source.pipeThrough(carStream).pipeTo(new WritableStream({
168171
write: (block) => { blocks.push(block) }
@@ -221,6 +224,7 @@ describe('freeway', () => {
221224
const source = /** @type {ReadableStream<Uint8Array>} */ (obj.body)
222225
const carStream = new CARReaderStream()
223226

227+
/** @type {(Block & Position)[]} */
224228
const blocks = []
225229
await source.pipeThrough(carStream).pipeTo(new WritableStream({
226230
write: (block) => { blocks.push(block) }

0 commit comments

Comments
 (0)