File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 11export * from './assert/index.ts' ;
2+ export * from './cache/index.ts' ;
23export * from './config/index.ts' ;
34export * from './fallback/index.ts' ;
45export * from './flatten/index.ts' ;
Original file line number Diff line number Diff line change @@ -3,15 +3,15 @@ import { _Cache } from './_Cache.ts';
33
44describe ( '_Cache' , ( ) => {
55 test ( 'should cache values' , ( ) => {
6- const cache = new _Cache < string , number > ( ) ;
6+ const cache = new _Cache < string , number > ( { maxSize : 1 } ) ;
77
88 cache . set ( 'foo' , 123 ) ;
99 expect ( cache . get ( 'foo' ) ) . toBe ( 123 ) ;
1010
1111 cache . set ( 'bar' , 456 ) ;
1212
1313 expect ( cache . get ( 'bar' ) ) . toBe ( 456 ) ;
14- // default max size is 1
14+
1515 expect ( cache . get ( 'foo' ) ) . toBeUndefined ( ) ;
1616 } ) ;
1717 test ( 'should allow deleting' , ( ) => {
You can’t perform that action at this time.
0 commit comments