Skip to content

Commit

Permalink
test(pins): use generator syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtPooki committed Dec 14, 2023
1 parent 0a8f5ba commit 7f9dbb5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/helia/test/pins.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ describe('pins', () => {
it('pins a block from another node', async () => {
const cid = CID.parse(process.env.BLOCK_CID ?? '')
await helia.libp2p.dial(multiaddr(process.env.RELAY_SERVER))
await helia.pins.add(cid)
await all(parallel(helia.pins.add(cid)))

const pins = await all(helia.pins.ls())

Expand All @@ -172,7 +172,7 @@ describe('pins', () => {
const cid1 = await createAndPutBlock(dagJson.code, dagJson.encode({ hello: 'world' }), helia.blockstore)
const cid2 = await createAndPutBlock(dagJson.code, dagJson.encode({ hello: 'world', linked: cid1 }), helia.blockstore)

await helia.pins.add(cid2)
await all(parallel(helia.pins.add(cid2)))

const pins = await all(helia.pins.ls())

Expand All @@ -189,7 +189,7 @@ describe('pins', () => {
const cid1 = await createAndPutBlock(dagCbor.code, dagCbor.encode({ hello: 'world' }), helia.blockstore)
const cid2 = await createAndPutBlock(dagCbor.code, dagCbor.encode({ hello: 'world', linked: cid1 }), helia.blockstore)

await helia.pins.add(cid2)
await all(parallel(helia.pins.add(cid2)))

const pins = await all(helia.pins.ls())

Expand All @@ -206,7 +206,7 @@ describe('pins', () => {
const cid1 = await createAndPutBlock(dagPb.code, dagPb.encode({ Data: Uint8Array.from([0, 1, 2, 3, 4]), Links: [] }), helia.blockstore)
const cid2 = await createAndPutBlock(dagPb.code, dagPb.encode({ Links: [{ Name: '', Hash: cid1, Tsize: 100 }] }), helia.blockstore)

await helia.pins.add(cid2)
await all(parallel(helia.pins.add(cid2)))

const pins = await all(helia.pins.ls())

Expand Down

0 comments on commit 7f9dbb5

Please sign in to comment.