Skip to content

Commit

Permalink
fix: Resolver tests
Browse files Browse the repository at this point in the history
  • Loading branch information
simonas-notcat authored and mirceanis committed Sep 7, 2020
1 parent 156c49f commit 65b3ff0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ describe('daf-resolver-universal', () => {

it('should have resolve method', () => {
const resolver = new DafUniversalResolver({ url: 'https://example/' })
expect(resolver).toHaveProperty('resolve')
expect(resolver).toHaveProperty('resolveDid')
})

it('should fetch did doc', async () => {
const resolver = new DafUniversalResolver({ url: 'https://example/' })
fetchMock.mockResponse(JSON.stringify({ didDocument: { data: '12345' } }))
const doc = await resolver.resolve('did:example:123')
const doc = await resolver.resolveDid({ didUrl: 'did:example:123' })
expect(doc).toEqual({ data: '12345' })
})
})
2 changes: 1 addition & 1 deletion packages/daf-resolver/src/__tests__/resolver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ describe('daf-resolver', () => {

it('should have resolve method', () => {
const resolver = new DafResolver({ infuraProjectId: 'xxx' })
expect(resolver).toHaveProperty('resolve')
expect(resolver).toHaveProperty('resolveDid')
})
})

0 comments on commit 65b3ff0

Please sign in to comment.