@@ -292,6 +292,7 @@ describe('issuing a device response', () => {
292
292
const eReaderKeyBytes : Buffer = randomFillSync ( Buffer . alloc ( 32 ) )
293
293
const readerEngagementBytes = randomFillSync ( Buffer . alloc ( 32 ) )
294
294
const deviceEngagementBytes = randomFillSync ( Buffer . alloc ( 32 ) )
295
+ let encodedDeviceResponse : Uint8Array
295
296
296
297
const getSessionTranscriptBytes = ( rdrEngtBytes : Buffer , devEngtBytes : Buffer , eRdrKeyBytes : Buffer ) =>
297
298
cborEncode (
@@ -386,6 +387,26 @@ describe('issuing a device response', () => {
386
387
expect ( validityInfo . expectedUpdate ) . toBeUndefined ( )
387
388
} )
388
389
390
+ it ( 'should contain all requested claims' , ( ) => {
391
+ const namespaces = parsedDocument . allIssuerSignedNamespaces
392
+ expect ( namespaces ) . toStrictEqual ( {
393
+ 'org.iso.18013.5.1' : {
394
+ family_name : 'Jones' ,
395
+ birth_date : '2007-03-25' ,
396
+ document_number : '01-856-5050' ,
397
+ given_name : 'Ava' ,
398
+ driving_privileges : [ expect . any ( Map ) ] ,
399
+ expiry_date : '2028-09-30' ,
400
+ issue_date : '2023-09-01' ,
401
+ issuing_authority : 'NY DMV' ,
402
+ issuing_country : 'US' ,
403
+ issuing_jurisdiction : 'New York' ,
404
+ portrait : 'bstr' ,
405
+ un_distinguishing_sign : 'tbd-us.ny.dmv' ,
406
+ } ,
407
+ } )
408
+ } )
409
+
389
410
it ( 'should contain the device namespaces' , ( ) => {
390
411
expect ( parsedDocument . getDeviceNameSpace ( 'com.foobar-device' ) ) . toEqual ( {
391
412
test : 1234 ,
0 commit comments