@@ -6,6 +6,7 @@ import {createInitialVc, endpointCheck} from '../helpers.js';
6
6
import {
7
7
assertions ,
8
8
} from 'data-integrity-test-suite-assertion' ;
9
+ import { didResolver } from '../didResolver.js' ;
9
10
import { expect } from 'chai' ;
10
11
11
12
export function dataModelSuite ( {
@@ -70,9 +71,12 @@ export function dataModelSuite({
70
71
for ( const proof of proofs ) {
71
72
expect ( proof . verificationMethod ) . to . exist ;
72
73
expect ( proof . verificationMethod ) . to . be . a ( 'string' ) ;
74
+ const didDoc = await didResolver ( { url : proof . verificationMethod } ) ;
75
+ expect ( didDoc ) . to . be . an ( 'object' ) ;
76
+ expect ( didDoc . publicKeyMultibase ) . to . be . a ( 'string' ) ;
73
77
expect (
74
- assertions . shouldBeBs58 ( proof . verificationMethod ) ,
75
- 'Expected "proof.verificationMethod " to be Base58 encoded'
78
+ assertions . shouldBeBs58 ( didDoc . publicKeyMultibase ) ,
79
+ 'Expected "publicKeyMultibase " to be Base58 encoded'
76
80
) . to . be . true ;
77
81
}
78
82
} ) ;
@@ -83,9 +87,12 @@ export function dataModelSuite({
83
87
for ( const proof of proofs ) {
84
88
expect ( proof . verificationMethod ) . to . exist ;
85
89
expect ( proof . verificationMethod ) . to . be . a ( 'string' ) ;
90
+ const didDoc = await didResolver ( { url : proof . verificationMethod } ) ;
91
+ expect ( didDoc ) . to . be . an ( 'object' ) ;
92
+ expect ( didDoc . publicKeyMultibase ) . to . be . a ( 'string' ) ;
86
93
expect (
87
- assertions . shouldBeBs58 ( proof . verificationMethod ) ,
88
- 'Expected "proof.verificationMethod " to be Base58 encoded'
94
+ assertions . shouldBeBs58 ( didDoc . publicKeyMultibase ) ,
95
+ 'Expected "publicKeyMultibase " to be Base58 encoded'
89
96
) . to . be . true ;
90
97
}
91
98
} ) ;
0 commit comments