Skip to content

Commit 1879ddc

Browse files
added test for local storage
1 parent ea6f0e4 commit 1879ddc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/integrationTests/options.test.ts

+9
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,15 @@ describe('does not call NoIdentityAvailable event', () => {
721721
await uid2.setIdentityFromEmail('test@test.com', mocks.makeUid2CstgOption());
722722
}).not.toThrow();
723723

724+
expect(handler).not.toHaveBeenLastCalledWith(EventType.NoIdentityAvailable, {
725+
identity: null,
726+
});
727+
});
728+
test('when identity is set with local storage', () => {
729+
let validIdentity = makeIdentity();
730+
mocks.setUid2LocalStorage(validIdentity);
731+
uid2.init({});
732+
724733
expect(handler).not.toHaveBeenLastCalledWith(EventType.NoIdentityAvailable, {
725734
identity: null,
726735
});

0 commit comments

Comments
 (0)