LruCache | should provide a 'set' method for a key/value pair and a 'get' method to retrieve by key | passed in 0.004s |
LruCache | should allow to pass an array of alternate keys to 'set' method. 'get' and 'has' must also work with the alternate key | passed in 0.002s |
LruCache | should provide a 'setAsync' method that also supports alternate keys | passed in 0.008s |
LruCache | should provide a 'setAll' method that supports alternateKeys and allow for alternateKeys to be a string instead of an array | passed in 0.001s |
LruCache | should throw when no array is passed to 'setAll' | passed in 0s |
LruCache | should provide a 'setAllAsync' method | passed in 0.001s |
LruCache | should throw when trying to use an alternate key that is already used for another key | passed in 0s |
LruCache | should provide a 'setMaxSize' and 'getMaxSize' method and should use max size infinite, if null or 0 is passed to 'setMaxSize' | passed in 0.001s |
LruCache | should provide a 'getSize' method | passed in 0s |
LruCache | should provide a 'delete' method that works with key, but not with alternate key | passed in 0.002s |
LruCache | should provide a 'getValueType' method | passed in 0s |
LruCache | should provide a 'getEntries' method | passed in 0s |
LruCache | should provide a 'forEach' method that iterates from oldest to newest entry | passed in 0.001s |
LruCache | should provide a method to define an entry getter that is used in case of a cache miss | passed in 0s |
LruCache | should provide a method to define an async entry getter that is used in case of a cache miss | passed in 0.203s |
LruCache | should handle the case where a getter returns undefined | passed in 0.412s |
LruCache | should take the value from the entry getter and not from the cache, if specified in get | passed in 0s |
LruCache | should throw, if value should be taken from entry getter and no entry getter is defined | passed in 0.001s |
LruCache | should be possible to override a set entry getter by passing a custom one to the get method | passed in 0.001s |
getCache | should return the same LruCache instance for the same value type (LruCache must be a per-valueType-singleton) | passed in 0s |
clearAllCaches | should clear all caches | passed in 0.002s |
registerCacheChangedHandler | should register a listener to cache change events and return a handlerHandle to activate/deactivate or unregister the listener | passed in 0.002s |
registerCacheChangedHandler | should call a listener only once in case of setAll | passed in 0.001s |
registerCacheChangedHandler | should create correct change events for set | passed in 0.003s |
registerCacheChangedHandler | should throw an error in case of throwing change handlers, but still keep the cache consistent | passed in 0.001s |
registerCacheChangedHandler | should create correct change events for delete | passed in 0.001s |
registerCacheChangedHandler | should create correct change events for clear | passed in 0s |
registerCacheChangedHandler | should create correct change events for LRU removes | passed in 0.002s |
registerCacheChangedHandler | should create correct change events if setMaxSize leads to LRU removes | passed in 0.001s |
registerCacheChangedHandler | should only listen to events of the given value types | passed in 0s |
cacheTransaction | should batch change events inside a cache transaction into a single change event being dispatched | passed in 0.002s |
cacheTransaction | should handle a promise instead of a callback | passed in 0.013s |
LruMap | should take maxSize as constructor argument and should provide getMaxSize method | passed in 0.001s |
LruMap | should provide set, get and has methods like a Map | passed in 0.001s |
LruMap | should let the set method return the removed entry in case maxSize was exceeded, else null | passed in 0.001s |
LruMap | should provide a getSize method | passed in 0.001s |
LruMap | should provide a delete method that returns false in case the to be deleted key was not in the map | passed in 0s |
LruMap | should provide a setMaxSize method that returns an array of removed entries in case the newMaxSize is smaller than map size | passed in 0s |
LruMap | should set maxSize to null (meaning infinite) in case 0 is provided as argument | passed in 0.001s |
LruMap | should provide a forEach method like a Map | passed in 0s |
LruMap | should provide a map method | passed in 0.001s |
LruMap | should provide a clear method that returns an array of removed entries | passed in 0s |
LruMap | should provide correct LRU logic | passed in 0.002s |