@@ -48,7 +48,7 @@ describe("getToken", () => {
4848
4949 const nowInSeconds = 1749052001 ;
5050
51- const profile = {
51+ const profile : Profile = {
5252 nhs_number : "test_nhs_number" ,
5353 } ;
5454
@@ -101,6 +101,7 @@ describe("getToken", () => {
101101 expectResultToMatchTokenWith (
102102 result ,
103103 profile . nhs_number ,
104+ "" ,
104105 "newIdToken" ,
105106 "new-apim-access-token" ,
106107 nowInSeconds + 1111 ,
@@ -118,7 +119,7 @@ describe("getToken", () => {
118119
119120 const result = await getToken ( undefinedToken , undefinedAccount , undefinedProfile , maxAgeInSeconds ) ;
120121
121- expectResultToMatchTokenWith ( result , "" , "" , "" , 0 , maxAgeInSeconds ) ;
122+ expectResultToMatchTokenWith ( result , "" , "" , "" , "" , 0 , maxAgeInSeconds ) ;
122123 } ) ;
123124
124125 it ( "should fill in missing values in token with default empty string" , async ( ) => {
@@ -166,7 +167,7 @@ describe("getToken", () => {
166167
167168 const result = await getToken ( token , account , profile , maxAgeInSeconds ) ;
168169
169- expectResultToMatchTokenWith ( result , profile . nhs_number , "newIdToken" , "" , 0 , maxAgeInSeconds ) ;
170+ expectResultToMatchTokenWith ( result , profile . nhs_number , "" , " newIdToken", "" , 0 , maxAgeInSeconds ) ;
170171 } ) ;
171172 } ) ;
172173
@@ -182,13 +183,14 @@ describe("getToken", () => {
182183
183184 const result = await getToken ( token , account , profile , maxAgeInSeconds ) ;
184185
185- expectResultToMatchTokenWith ( result , profile . nhs_number , "newIdToken" , "" , 0 , maxAgeInSeconds ) ;
186+ expectResultToMatchTokenWith ( result , profile . nhs_number , "" , " newIdToken", "" , 0 , maxAgeInSeconds ) ;
186187 } ) ;
187188 } ) ;
188189
189190 const expectResultToMatchTokenWith = (
190191 result : JWT | null ,
191192 nhsNumber : string ,
193+ birthdate : string ,
192194 idToken : string ,
193195 apimToken : string ,
194196 apimExpiresAt : number ,
@@ -198,6 +200,7 @@ describe("getToken", () => {
198200 expect ( result ) . toMatchObject ( {
199201 user : {
200202 nhs_number : nhsNumber ,
203+ birthdate : birthdate ,
201204 } ,
202205 nhs_login : {
203206 id_token : idToken ,
0 commit comments