Skip to content

Commit

Permalink
rm only
Browse files Browse the repository at this point in the history
  • Loading branch information
salazarm committed Dec 20, 2024
1 parent 46d5e2b commit a267f63
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ describe('weakMapMemoize', () => {
});

// Test 12: Exercising the maxEntries option
it.only('should evict least recently used entries when maxEntries is exceeded', () => {
it('should evict least recently used entries when maxEntries is exceeded', () => {
const spy = jest.fn((a: number) => a * 2);
const memoizedFn = weakMapMemoize(spy, {maxEntries: 2});

Expand All @@ -285,6 +285,6 @@ describe('weakMapMemoize', () => {
// Accessing 1 again should trigger a new call since it was evicted
const result6 = memoizedFn(1);
expect(result6).toBe(2);
expect(spy).toHaveBeenCalledTimes(4); // Call for 1 again
expect(spy).toHaveBeenCalledTimes(5); // Call for 1 again
});
});

0 comments on commit a267f63

Please sign in to comment.