From fcc5c326c61cb7f6c75777bd48d1e01b80476926 Mon Sep 17 00:00:00 2001 From: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:18:15 -0800 Subject: [PATCH] test: fix dns-resolvers test --- packages/verified-fetch/test/verified-fetch.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/verified-fetch/test/verified-fetch.spec.ts b/packages/verified-fetch/test/verified-fetch.spec.ts index 21bd09d3d..1b3366c22 100644 --- a/packages/verified-fetch/test/verified-fetch.spec.ts +++ b/packages/verified-fetch/test/verified-fetch.spec.ts @@ -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"')