@@ -8,7 +8,6 @@ describe('AuthorizationDetailsBuilder test', () => {
88 const actual = new AuthorizationDetailsBuilder ( )
99 . withFormats ( 'jwt_vc' as OID4VCICredentialFormat )
1010 . withLocations ( [ 'test1' , 'test2' ] )
11- . withType ( 'openid_credential' )
1211 . buildJwtVcJson ( )
1312 expect ( actual ) . toEqual ( {
1413 type : 'openid_credential' ,
@@ -20,7 +19,6 @@ describe('AuthorizationDetailsBuilder test', () => {
2019 const actual = new AuthorizationDetailsBuilder ( )
2120 . withFormats ( 'jwt_vc' as OID4VCICredentialFormat )
2221 . withLocations ( [ 'test1' ] )
23- . withType ( 'openid_credential' )
2422 . buildJwtVcJson ( )
2523 expect ( actual ) . toEqual ( {
2624 type : 'openid_credential' ,
@@ -31,24 +29,16 @@ describe('AuthorizationDetailsBuilder test', () => {
3129 it ( 'should create AuthorizationDetails object if locations is missing' , ( ) => {
3230 const actual = new AuthorizationDetailsBuilder ( )
3331 . withFormats ( 'jwt_vc' as OID4VCICredentialFormat )
34- . withType ( 'openid_credential' )
3532 . buildJwtVcJson ( )
3633 expect ( actual ) . toEqual ( {
3734 type : 'openid_credential' ,
3835 format : 'jwt_vc' ,
3936 } )
4037 } )
41- it ( 'should fail if type is missing' , ( ) => {
42- expect ( ( ) => {
43- new AuthorizationDetailsBuilder ( )
44- . withFormats ( 'jwt_vc' as OID4VCICredentialFormat )
45- . withLocations ( [ 'test1' ] )
46- . buildJwtVcJson ( )
47- } ) . toThrow ( Error ( 'Type and format are required properties' ) )
48- } )
38+
4939 it ( 'should fail if format is missing' , ( ) => {
5040 expect ( ( ) => {
51- new AuthorizationDetailsBuilder ( ) . withType ( 'openid_credential' ) . withLocations ( [ 'test1' ] ) . buildJwtVcJson ( )
41+ new AuthorizationDetailsBuilder ( ) . withLocations ( [ 'test1' ] ) . buildJwtVcJson ( )
5242 } ) . toThrow ( Error ( 'Type and format are required properties' ) )
5343 } )
5444} )
0 commit comments