fix unit tests

This commit is contained in:
Bruno Windels 2021-10-22 17:30:20 +02:00
parent 77d10c93d6
commit 45dc2162dc

View file

@ -135,7 +135,7 @@ export function tests() {
"evict callback is called": assert => { "evict callback is called": assert => {
let evictions = 0; let evictions = 0;
class CustomCache extends LRUCache<NameTuple, number> { class CustomCache extends LRUCache<NameTuple, number> {
_onEvictEntry(entry) { onEvictEntry(entry) {
assert.equal(entry.name, "Alice"); assert.equal(entry.name, "Alice");
evictions += 1; evictions += 1;
} }
@ -149,7 +149,7 @@ export function tests() {
"evict callback is called when replacing entry with same identity": assert => { "evict callback is called when replacing entry with same identity": assert => {
let evictions = 0; let evictions = 0;
class CustomCache extends LRUCache<NameTuple, number> { class CustomCache extends LRUCache<NameTuple, number> {
_onEvictEntry(entry) { onEvictEntry(entry) {
assert.equal(entry.name, "Alice"); assert.equal(entry.name, "Alice");
evictions += 1; evictions += 1;
} }