@@ -344,59 +344,53 @@ describe('Credential Request Client with different issuers ', () => {
344344
345345describe ( 'Credential Offer Client error handling' , ( ) => {
346346 beforeEach ( ( ) => {
347- nock . cleanAll ( )
348- } )
347+ nock . cleanAll ( ) ;
348+ } ) ;
349349
350350 afterEach ( ( ) => {
351- nock . cleanAll ( )
352- } )
351+ nock . cleanAll ( ) ;
352+ } ) ;
353353
354354 it ( 'should handle non-200 response from credential offer URI endpoint' , async ( ) => {
355- const IRR_URI = 'openid-credential-offer://?credential_offer_uri=https%3A%2F%2Ftest.example.com%2Foffer'
355+ const IRR_URI = 'openid-credential-offer://?credential_offer_uri=https%3A%2F%2Ftest.example.com%2Foffer' ;
356356
357- nock ( 'https://test.example.com' )
358- . get ( '/offer' )
359- . reply ( 404 , 'Not Found' )
357+ nock ( 'https://test.example.com' ) . get ( '/offer' ) . reply ( 404 , 'Not Found' ) ;
360358
361359 await expect ( CredentialOfferClient . fromURI ( IRR_URI ) ) . rejects . toMatch (
362- / t h e c r e d e n t i a l o f f e r U R I e n d p o i n t c a l l w a s n o t s u c c e s s f u l . h t t p c o d e 4 0 4 - r e a s o n N o t F o u n d /
363- )
364- } )
360+ / t h e c r e d e n t i a l o f f e r U R I e n d p o i n t c a l l w a s n o t s u c c e s s f u l . h t t p c o d e 4 0 4 - r e a s o n N o t F o u n d / ,
361+ ) ;
362+ } ) ;
365363
366364 it ( 'should handle invalid content type from credential offer URI endpoint' , async ( ) => {
367- const IRR_URI = 'openid-credential-offer://?credential_offer_uri=https%3A%2F%2Ftest.example.com%2Foffer'
365+ const IRR_URI = 'openid-credential-offer://?credential_offer_uri=https%3A%2F%2Ftest.example.com%2Foffer' ;
368366
369- nock ( 'https://test.example.com' )
370- . get ( '/offer' )
371- . reply ( 200 , 'plain text response' , { 'Content-Type' : 'text/plain' } )
367+ nock ( 'https://test.example.com' ) . get ( '/offer' ) . reply ( 200 , 'plain text response' , { 'Content-Type' : 'text/plain' } ) ;
372368
373369 await expect ( CredentialOfferClient . fromURI ( IRR_URI ) ) . rejects . toMatch (
374- 'the credential offer URI endpoint did not return content type application/json'
375- )
376- } )
370+ 'the credential offer URI endpoint did not return content type application/json' ,
371+ ) ;
372+ } ) ;
377373
378374 it ( 'should handle missing required credential offer properties' , async ( ) => {
379- const IRR_URI = 'openid-credential-offer://?invalid_param=test'
375+ const IRR_URI = 'openid-credential-offer://?invalid_param=test' ;
380376
381- await expect ( CredentialOfferClient . fromURI ( IRR_URI ) ) . rejects . toThrow ( 'Wrong parameters provided' )
382- } )
377+ await expect ( CredentialOfferClient . fromURI ( IRR_URI ) ) . rejects . toThrow ( 'Wrong parameters provided' ) ;
378+ } ) ;
383379
384380 it ( 'should handle credential offer URI with credential_offer param' , async ( ) => {
385- const IRR_URI = 'openid-credential-offer://?credential_offer=%7B%22test%22%3A%22value%22%7D'
381+ const IRR_URI = 'openid-credential-offer://?credential_offer=%7B%22test%22%3A%22value%22%7D' ;
386382
387- const client = await CredentialOfferClient . fromURI ( IRR_URI )
388- expect ( client . credential_offer ) . toBeDefined ( )
389- } )
383+ const client = await CredentialOfferClient . fromURI ( IRR_URI ) ;
384+ expect ( client . credential_offer ) . toBeDefined ( ) ;
385+ } ) ;
390386
391387 it ( 'should handle URL encoded credential offer URI properly' , async ( ) => {
392- const encodedUri = 'https%3A%2F%2Ftest.example.com%2Foffer'
393- const IRR_URI = `openid-credential-offer://?credential_offer_uri=${ encodedUri } `
388+ const encodedUri = 'https%3A%2F%2Ftest.example.com%2Foffer' ;
389+ const IRR_URI = `openid-credential-offer://?credential_offer_uri=${ encodedUri } ` ;
394390
395- nock ( 'https://test.example.com' )
396- . get ( '/offer' )
397- . reply ( 200 , { test : 'value' } , { 'Content-Type' : 'application/json' } )
391+ nock ( 'https://test.example.com' ) . get ( '/offer' ) . reply ( 200 , { test : 'value' } , { 'Content-Type' : 'application/json' } ) ;
398392
399- const client = await CredentialOfferClient . fromURI ( IRR_URI )
400- expect ( client . credential_offer ) . toBeDefined ( )
401- } )
402- } )
393+ const client = await CredentialOfferClient . fromURI ( IRR_URI ) ;
394+ expect ( client . credential_offer ) . toBeDefined ( ) ;
395+ } ) ;
396+ } ) ;
0 commit comments