Skip to content

Commit

Permalink
add additional test for expiration time exactly equal to tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
jjarvisp committed Dec 19, 2024
1 parent 84bed81 commit 579a44f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/core/__tests__/libraryUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,14 @@ describe('isTokenExpired', () => {

expect(result).toBe(true);
});

it('should return false when expiration time is equal to tolerance', () => {
const result = isTokenExpired({
expiresAt: Date.now() + 5000, // exactly 5 seconds remaining until expiration
clockDrift: 0,
tolerance: 5000,
});

expect(result).toBe(false);
});
});

0 comments on commit 579a44f

Please sign in to comment.