File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,18 @@ describe("cacheable set method", async () => {
184184 const result = await cacheable . getMany ( [ "key1" , "key2" ] ) ;
185185 expect ( result ) . toEqual ( [ "value1" , "value2" ] ) ;
186186 } ) ;
187+ test ( "should set many values" , async ( ) => {
188+ const cacheable = new Cacheable ( ) ;
189+ await cacheable . setMany ( [
190+ { key : "key1" , value : "value1" } ,
191+ { key : "key2" , value : "value2" } ,
192+ ] ) ;
193+ const result1 = await cacheable . get ( "key1" ) ;
194+ const result2 = await cacheable . get ( "key2" ) ;
195+ expect ( result1 ) . toEqual ( "value1" ) ;
196+ expect ( result2 ) . toEqual ( "value2" ) ;
197+ } ) ;
198+
187199 test ( "should set value in a non blocking way" , async ( ) => {
188200 const secondary = new Keyv ( ) ;
189201 const cacheable = new Cacheable ( { nonBlocking : true , secondary } ) ;
You can’t perform that action at this time.
0 commit comments