fix unit tests
This commit is contained in:
parent
77d10c93d6
commit
45dc2162dc
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue