@@ -6,6 +6,7 @@ import {createInitialVc, endpointCheck} from '../helpers.js';
66import {
77 assertions ,
88} from 'data-integrity-test-suite-assertion' ;
9+ import { didResolver } from '../didResolver.js' ;
910import { expect } from 'chai' ;
1011
1112export function dataModelSuite ( {
@@ -70,9 +71,12 @@ export function dataModelSuite({
7071 for ( const proof of proofs ) {
7172 expect ( proof . verificationMethod ) . to . exist ;
7273 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' ) ;
7377 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'
7680 ) . to . be . true ;
7781 }
7882 } ) ;
@@ -83,9 +87,12 @@ export function dataModelSuite({
8387 for ( const proof of proofs ) {
8488 expect ( proof . verificationMethod ) . to . exist ;
8589 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' ) ;
8693 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'
8996 ) . to . be . true ;
9097 }
9198 } ) ;
0 commit comments