Skip to content

Commit 21fd402

Browse files
author
Tomas Micko
committed
IS--8894 Update unit tests
1 parent ab989a8 commit 21fd402

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/index.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ describe('test onPageLoad() function', () => {
5757
const queryString = '?state=foo&code=bar'
5858
const response = await client.onPageLoad(redirectUri + queryString);
5959
expect(response.idTokenClaims?.sub).toBe('login-end');
60+
expect(response.isLoggedIn).toBe(true);
61+
expect(response.accessTokenExpiresIn).toBe(300);
6062
});
6163

6264
test('when url contains state and error, /login/end should be called', async () => {
@@ -75,6 +77,8 @@ describe('test onPageLoad() function', () => {
7577
const queryString = '?response=eyjwt&state=foo'
7678
const response = await client.onPageLoad(redirectUri + queryString);
7779
expect(response.idTokenClaims?.sub).toBe('session');
80+
expect(response.isLoggedIn).toBe(true);
81+
expect(response.accessTokenExpiresIn).toBe(300);
7882
});
7983

8084
test('when url contains only state, /session should be called', async () => {

0 commit comments

Comments
 (0)