Skip to content

Commit 59856db

Browse files
more set identity examples
1 parent bacfbf6 commit 59856db

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/integrationTests/options.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,5 +619,16 @@ describe('Store config UID2', () => {
619619
identity: null,
620620
});
621621
});
622+
test('runs NoIdentityAvailable event', () => {
623+
uid2.init({});
624+
let expiredIdentity = makeIdentity({
625+
identity_expires: Date.now() - 5000,
626+
refresh_expires: Date.now() - 5000,
627+
});
628+
uid2.setIdentity(expiredIdentity);
629+
expect(handler).toHaveBeenLastCalledWith(EventType.NoIdentityAvailable, {
630+
identity: null,
631+
});
632+
});
622633
});
623634
});

0 commit comments

Comments
 (0)