Skip to content

Commit

Permalink
test: fix dns-resolvers test
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtPooki committed Feb 21, 2024
1 parent 5efdb95 commit fcc5c32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/verified-fetch/test/verified-fetch.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,9 @@ describe('@helia/verifed-fetch', () => {
}, {
dnsResolvers: [customResolver1, customResolver2]
})
// ignoring error of walking the CID because we haven't actually added the block to the blockstore
await expect(verifiedFetch.fetch('ipns://mydomain.com', { onProgress })).to.eventually.be.rejected
.with.property('code', 'ERR_EXPECTED_ERR_CODE')
// error of walking the CID/dag because we haven't actually added the block to the blockstore
await expect(verifiedFetch.fetch('ipns://mydomain.com', { onProgress })).to.eventually.be.rejectedWith('All promises were rejected')

expect(customResolver1.callCount).to.equal(1)
expect(customResolver1.getCall(0).args).to.deep.equal(['mydomain.com', { onProgress }])
await expect(customResolver1.getCall(0).returnValue).to.eventually.be.rejectedWith('Could not resolve PeerId "mydomain.com"')
Expand Down

0 comments on commit fcc5c32

Please sign in to comment.