Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
denysoblohin-okta committed Dec 19, 2024
1 parent c785a9d commit 7541cb4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/spec/authn/mfa-challenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -1592,17 +1592,17 @@ describe('MFA_CHALLENGE', function () {
}, 'success', 'https://auth-js-test.okta.com');

// mocks flow of wait, wait, wait, success
context.httpSpy = jest.spyOn(mocked.http, 'post')
.mockResolvedValueOnce(mfaPush.response)
.mockResolvedValueOnce(mfaPush.response)
.mockResolvedValueOnce(mfaPush.response)
.mockResolvedValueOnce(success.response);

context.httpSpy = jest.fn()
.mockResolvedValueOnce({responseText: JSON.stringify(mfaPush.response)})
.mockResolvedValueOnce({responseText: JSON.stringify(mfaPush.response)})
.mockResolvedValueOnce({responseText: JSON.stringify(mfaPush.response)})
.mockResolvedValueOnce({responseText: JSON.stringify(success.response)});

const oktaAuth = new OktaAuth({
issuer: 'https://auth-js-test.okta.com'
issuer: 'https://auth-js-test.okta.com',
httpRequestClient: context.httpSpy
});

context.transaction = oktaAuth.tx.createTransaction(mfaPush.response);
});

Expand Down

0 comments on commit 7541cb4

Please sign in to comment.