We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a231edc commit 8d75645Copy full SHA for 8d75645
1 file changed
lib/cache.test.ts
@@ -473,6 +473,20 @@ describe('TTLCache', () => {
473
474
cache.destroy();
475
});
476
+
477
+ it('verify TTLCache behavior for infinite TTL value (Variation 1)', () => {
478
+ const cache = new TTLCache<string>();
479
480
+ expect(() => {
481
+ cache.set('infinite-key', 'boundary-value', Infinity);
482
+ }).not.toThrow();
483
484
+ expect(cache.get('infinite-key')).toBe('boundary-value');
485
486
+ expect(cache.has('infinite-key')).toBe(true);
487
488
+ cache.destroy();
489
+ });
490
491
492
0 commit comments