Son CV dans un terminal web en Javascript! https://terminal-cv.gregandev.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

18 lines
474 B

import { WeakLRUCache } from '../index.js'
import chai from 'chai'
const assert = chai.assert
let cache = new WeakLRUCache()
suite('WeakLRUCache basic tests', function(){
test('add entries', function(){
let entry = cache.getValue(2)
assert.equal(entry, undefined)
let obj = {}
cache.setValue(2, obj)
assert.equal(cache.getValue(2), obj)
debugger
if (cache.expirer.clean)
cache.expirer.clean()
assert.equal(cache.getValue(2), obj)
})
})