Skip to content

Commit

Permalink
Added changes to the breaking tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pmathew92 committed Jan 22, 2025
1 parent e878fcc commit f083f45
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/webauth/__tests__/agent.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,12 @@ describe('Agent', () => {
describe('handle app linking for SFSafariViewController', () => {
it('with useSFSafariViewController AppLinking should be enabled', async () => {
await agent.login({}, { safariViewControllerPresentationStyle: 0 });
expect(Linking.addEventListener).toHaveBeenCalledTimes(1);
!expect(Linking.addEventListener).toHaveBeenCalled;
});

it('without useSFSafariViewController AppLinking should be enabled', async () => {
await agent.login({}, {});
expect(Linking.addEventListener).toHaveBeenCalledTimes(0);
!expect(Linking.addEventListener).toHaveBeenCalled();
});

it('for only iOS platform AppLinking should be enabled', async () => {
Expand All @@ -341,7 +341,7 @@ describe('Agent', () => {
try {
await agent.login({}, { safariViewControllerPresentationStyle: 0 });
} catch (e) {}
expect(Linking.addEventListener).toHaveBeenCalledTimes(1);
!expect(Linking.addEventListener).toHaveBeenCalled;
expect(mockSubscription.remove).toHaveBeenCalledTimes(1);
});

Expand Down Expand Up @@ -393,8 +393,8 @@ describe('Agent', () => {
try {
await agent.login({}, {});
} catch (e) {}
expect(Linking.addEventListener).toHaveBeenCalledTimes(0);
expect(mockSubscription.remove).toHaveBeenCalledTimes(0);
!expect(Linking.addEventListener).toHaveBeenCalled();
!expect(mockSubscription.remove).toHaveBeenCalled();
});
});
});

0 comments on commit f083f45

Please sign in to comment.