Skip to content

Commit

Permalink
Fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
poovamraj committed Nov 14, 2023
1 parent 83fda69 commit 73fa655
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/webauth/__tests__/agent.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ describe('Agent', () => {
invitationUrl: 'invitationUrl',
leeway: 220,
ephemeralSession: true,
useSFSafariViewController: true,
additionalParameters: { test: 'test' },
}
);
Expand All @@ -80,6 +81,7 @@ describe('Agent', () => {
'invitationUrl',
220,
true,
true,
{ test: 'test' }
);
});
Expand Down Expand Up @@ -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
);
});
});

Expand Down Expand Up @@ -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'
);
});
});
});

0 comments on commit 73fa655

Please sign in to comment.