Skip to content

Commit

Permalink
more set identity examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleysmithTTD committed Feb 13, 2025
1 parent bacfbf6 commit 59856db
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/integrationTests/options.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -619,5 +619,16 @@ describe('Store config UID2', () => {
identity: null,
});
});
test('runs NoIdentityAvailable event', () => {
uid2.init({});
let expiredIdentity = makeIdentity({
identity_expires: Date.now() - 5000,
refresh_expires: Date.now() - 5000,
});
uid2.setIdentity(expiredIdentity);
expect(handler).toHaveBeenLastCalledWith(EventType.NoIdentityAvailable, {
identity: null,
});
});
});
});

0 comments on commit 59856db

Please sign in to comment.