From 73fa65528227ab86bd07fd355227edb6c1f93aaf Mon Sep 17 00:00:00 2001 From: Poovamraj T T Date: Tue, 14 Nov 2023 21:34:23 +0100 Subject: [PATCH] Fixed failing tests --- src/webauth/__tests__/agent.spec.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/webauth/__tests__/agent.spec.js b/src/webauth/__tests__/agent.spec.js index ea0aed9b..479d49e4 100644 --- a/src/webauth/__tests__/agent.spec.js +++ b/src/webauth/__tests__/agent.spec.js @@ -63,6 +63,7 @@ describe('Agent', () => { invitationUrl: 'invitationUrl', leeway: 220, ephemeralSession: true, + useSFSafariViewController: true, additionalParameters: { test: 'test' }, } ); @@ -80,6 +81,7 @@ describe('Agent', () => { 'invitationUrl', 220, true, + true, { test: 'test' } ); }); @@ -130,10 +132,16 @@ describe('Agent', () => { { customScheme: 'test', federated: true, + useSFSafariViewController: true, } ); expect(mock).toBeCalledWith(NativeModules.A0Auth0, clientId, domain); - expect(mockLogin).toBeCalledWith('test', true, 'test://test.com/test-os/com.my.app/callback'); + expect(mockLogin).toBeCalledWith( + 'test', + true, + 'test://test.com/test-os/com.my.app/callback', + true + ); }); }); @@ -162,10 +170,11 @@ describe('Agent', () => { }); }); - describe('callbackUri', () => { it('should return callback uri with given domain and scheme', async () => { - await expect(agent.callbackUri('domain', 'scheme')).toEqual("scheme://domain/test-os/com.test/callback"); + await expect(agent.callbackUri('domain', 'scheme')).toEqual( + 'scheme://domain/test-os/com.test/callback' + ); }); }); });