File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,19 @@ export function runDataIntegrityProofFormatTests({
245
245
reason : 'Expected issuer to error when VC has an undefined term.'
246
246
} ) ;
247
247
} ) ;
248
+ it ( 'If the algorithm produces an error, the error MUST be propagated ' +
249
+ 'and SHOULD convey the error type.' , async function ( ) {
250
+ this . test . link = 'https://w3c.github.io/vc-data-integrity/#dfn-input-document:~:text=If%20the%20algorithm%20produces%20an%20error%2C%20the%20error%20MUST%20be%20propagated%20and%20SHOULD%20convey%20the%20error%20type' ;
251
+ const noSubject = structuredClone ( credential ) ;
252
+ delete noSubject . credentialSubject ;
253
+ // FIXME this test should look for a propagated error such as
254
+ // PROOF_GENERATION_ERROR
255
+ await shouldFailIssuance ( {
256
+ credential : noSubject ,
257
+ issuer,
258
+ reason : 'Expected issuer to error when VC has no credentialSubject.'
259
+ } ) ;
260
+ } ) ;
248
261
if ( cryptosuiteName ) {
249
262
it ( 'The value of the cryptosuite property MUST be a string that ' +
250
263
'identifies the cryptographic suite.' , async function ( ) {
You can’t perform that action at this time.
0 commit comments