Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cache size becoming double of the defined size #13

Merged
merged 4 commits into from
May 29, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve test
  • Loading branch information
hong4rc committed May 15, 2019
commit 6cd42f9e349000ba4cc38529ab861a60c0450ca6
4 changes: 1 addition & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ test('checks total cache size does not exceed maxSize', t => {
const lru = new QuickLRU({maxSize: 2});
lru.set('1', 1);
lru.set('2', 2);
lru.set('3', 3);
lru.get('1');
lru.get('3');
t.is(lru.size, 2);
t.is(lru.oldCache.has('1'), false);
});