diff --git a/packages/dids/tests/dht.spec.ts b/packages/dids/tests/dht.spec.ts index 9c889e9a0..ce84e8d64 100644 --- a/packages/dids/tests/dht.spec.ts +++ b/packages/dids/tests/dht.spec.ts @@ -4,6 +4,7 @@ import {DidDht} from '../src/dht.js'; import {DidDhtKeySet, DidDhtMethod} from '../src/did-dht.js'; import {DidKeySetVerificationMethodKey, DidService} from '../src/index.js'; + describe('DHT', function () { this.timeout('15000'); // 15 seconds @@ -21,6 +22,10 @@ describe('DHT', function () { expect(published).to.be.true; + // wait for propagation + const wait = ms => new Promise(resolve => setTimeout(resolve, ms)); + await wait(1000*10); + const gotDid = await DidDht.getDidDocument(document.id); expect(gotDid.id).to.deep.equal(document.id); expect(gotDid.capabilityDelegation).to.deep.equal(document.capabilityDelegation);