Skip to content

Commit

Permalink
more waits
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe committed Nov 1, 2023
1 parent cece02c commit 01c76a2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/dids/tests/did-dht.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ describe('did-dht', () => {
expect(didResolutionResult.didDocument.verificationMethod[0].publicKeyJwk.kid).to.equal('0');
expect(didResolutionResult.didDocument.service).to.not.exist;

// wait for propagation
const wait = ms => new Promise(resolve => setTimeout(resolve, ms));
await wait(1000*10);

const gotDid = await DidDhtMethod.resolve(document.id);
expect(gotDid.id).to.deep.equal(document.id);
expect(gotDid.service).to.deep.equal(document.service);
Expand All @@ -222,6 +226,11 @@ describe('did-dht', () => {

it('should create with publish and get a did document', async () => {
const {document} = await DidDhtMethod.create({publish: true});

// wait for propagation
const wait = ms => new Promise(resolve => setTimeout(resolve, ms));
await wait(1000*10);

const gotDid = await DidDhtMethod.resolve(document.id);
expect(gotDid.id).to.deep.equal(document.id);
expect(gotDid.service).to.deep.equal(document.service);
Expand Down

0 comments on commit 01c76a2

Please sign in to comment.