Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fbianchicodermine committed Feb 6, 2025
1 parent 1c5f9f4 commit 7a02e04
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { AuthApi } from '../Auth.api';
import { AUTH_TOKEN_EXCHANGE } from '../auth.routes';

describe('Auth api tests', () => {

let mock: MockAdapter;

beforeAll(() => {
Expand All @@ -33,7 +32,12 @@ describe('Auth api tests', () => {
it('exchangeToken with rapidAccess', async () => {
const spidToken = 'mocked-token';
const rapidAccess: [AppRouteParams, string] = [AppRouteParams.AAR, 'mocked-qr-code'];
mock.onPost(AUTH_TOKEN_EXCHANGE(), { authorizationToken: spidToken }).reply(200, userResponseWithRetrievalId);
mock
.onPost(AUTH_TOKEN_EXCHANGE(), {
authorizationToken: spidToken,
aarQRCodeValue: 'mocked-qr-code',
})
.reply(200, userResponseWithRetrievalId);
const res = await AuthApi.exchangeToken({ spidToken, rapidAccess });
expect(res).toStrictEqual(userResponseWithRetrievalId);
});
Expand Down

0 comments on commit 7a02e04

Please sign in to comment.