Skip to content

Commit

Permalink
added test for local storage
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleysmithTTD committed Feb 14, 2025
1 parent ea6f0e4 commit 1879ddc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/integrationTests/options.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,15 @@ describe('does not call NoIdentityAvailable event', () => {
await uid2.setIdentityFromEmail('[email protected]', mocks.makeUid2CstgOption());
}).not.toThrow();

expect(handler).not.toHaveBeenLastCalledWith(EventType.NoIdentityAvailable, {
identity: null,
});
});
test('when identity is set with local storage', () => {
let validIdentity = makeIdentity();
mocks.setUid2LocalStorage(validIdentity);
uid2.init({});

expect(handler).not.toHaveBeenLastCalledWith(EventType.NoIdentityAvailable, {
identity: null,
});
Expand Down

0 comments on commit 1879ddc

Please sign in to comment.