@@ -59,7 +59,7 @@ describe('index', () => {
5959
6060 expect ( credential ) . toBeDefined ( ) ;
6161
62- const presentation = await sdjwt . present < typeof claims > (
62+ const presentation = await sdjwt . present (
6363 credential ,
6464 { foo : true } ,
6565 {
@@ -173,7 +173,7 @@ describe('index', () => {
173173 } ,
174174 ) ;
175175
176- const presentation = await sdjwt . present < typeof claims > (
176+ const presentation = await sdjwt . present (
177177 credential ,
178178 { foo : true } ,
179179 {
@@ -249,7 +249,7 @@ describe('index', () => {
249249 } ,
250250 ) ;
251251
252- const presentation = await sdjwt . present < typeof claims > (
252+ const presentation = await sdjwt . present (
253253 credential ,
254254 { foo : true } ,
255255 {
@@ -263,7 +263,9 @@ describe('index', () => {
263263 } ,
264264 ) ;
265265
266- const results = await sdjwt . verify ( presentation , [ 'foo' ] , true ) ;
266+ const results = await sdjwt . verify ( presentation , {
267+ requiredClaimKeys : [ 'foo' ] ,
268+ } ) ;
267269 expect ( results ) . toBeDefined ( ) ;
268270 } ) ;
269271
@@ -359,7 +361,7 @@ describe('index', () => {
359361 } ,
360362 ) ;
361363
362- const presentation = await sdjwt . present < typeof claims > (
364+ const presentation = await sdjwt . present (
363365 credential ,
364366 { foo : true } ,
365367 {
@@ -403,7 +405,7 @@ describe('index', () => {
403405 } ,
404406 ) ;
405407 try {
406- await sdjwt . present < typeof claims > (
408+ await sdjwt . present (
407409 credential ,
408410 { foo : true } ,
409411 {
@@ -445,7 +447,7 @@ describe('index', () => {
445447 } ,
446448 ) ;
447449
448- const presentation = await sdjwt . present < typeof claims > (
450+ const presentation = await sdjwt . present (
449451 credential ,
450452 { foo : true } ,
451453 {
@@ -488,7 +490,7 @@ describe('index', () => {
488490 } ,
489491 ) ;
490492
491- const presentation = sdjwt . present < typeof claims > (
493+ const presentation = sdjwt . present (
492494 credential ,
493495 { foo : true } ,
494496 {
@@ -501,7 +503,7 @@ describe('index', () => {
501503 } ,
502504 } ,
503505 ) ;
504- expect ( presentation ) . rejects . toThrow (
506+ await expect ( presentation ) . rejects . toThrow (
505507 'Key Binding sign algorithm not specified' ,
506508 ) ;
507509 } ) ;
@@ -526,13 +528,13 @@ describe('index', () => {
526528 } ,
527529 ) ;
528530 const sdjwt = new SDJwtInstance < SdJwtPayload > ( { } ) ;
529- expect ( sdjwt . keys ( '' ) ) . rejects . toThrow ( 'Hasher not found' ) ;
530- expect ( sdjwt . presentableKeys ( '' ) ) . rejects . toThrow ( 'Hasher not found' ) ;
531- expect ( sdjwt . getClaims ( '' ) ) . rejects . toThrow ( 'Hasher not found' ) ;
531+ await expect ( sdjwt . keys ( '' ) ) . rejects . toThrow ( 'Hasher not found' ) ;
532+ await expect ( sdjwt . presentableKeys ( '' ) ) . rejects . toThrow ( 'Hasher not found' ) ;
533+ await expect ( sdjwt . getClaims ( '' ) ) . rejects . toThrow ( 'Hasher not found' ) ;
532534 expect ( ( ) => sdjwt . decode ( '' ) ) . toThrowError ( 'Hasher not found' ) ;
533- expect (
534- sdjwt . present < typeof claims > ( credential , { foo : true } ) ,
535- ) . rejects . toThrow ( 'Hasher not found' ) ;
535+ await expect ( sdjwt . present ( credential , { foo : true } ) ) . rejects . toThrow (
536+ 'Hasher not found' ,
537+ ) ;
536538 } ) ;
537539
538540 test ( 'presentableKeys' , async ( ) => {
@@ -581,19 +583,15 @@ describe('index', () => {
581583 } ,
582584 ) ;
583585
584- const presentation = await sdjwt . present < typeof claims > (
585- credential ,
586- undefined ,
587- {
588- kb : {
589- payload : {
590- aud : '1' ,
591- iat : 1 ,
592- nonce : '342' ,
593- } ,
586+ const presentation = await sdjwt . present ( credential , undefined , {
587+ kb : {
588+ payload : {
589+ aud : '1' ,
590+ iat : 1 ,
591+ nonce : '342' ,
594592 } ,
595593 } ,
596- ) ;
594+ } ) ;
597595
598596 const decoded = await sdjwt . decode ( presentation ) ;
599597 expect ( decoded . jwt ) . toBeDefined ( ) ;
0 commit comments