File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -257,15 +257,15 @@ describe('#get', () => {
257257 } ) ;
258258
259259 it ( 'should support the legacy `path` property in the cache store' , async ( ) => {
260+ const file = path . join ( examplesDir , 'readme.yaml' ) ;
261+ cacheStore = new Cache ( file ) ;
260262 await cacheStore . saveFile ( ) ;
261263
262264 const cache = cacheStore . getCache ( ) ;
263- cache [ '44ec0da6e10c8806831ba3d4126c1b66' ] . path = path . join (
264- cacheStore . specsCache ,
265- `${ cache [ '44ec0da6e10c8806831ba3d4126c1b66' ] . hash } .json`
266- ) ;
265+ const cacheKey = Object . keys ( cache ) [ 0 ] ;
266+ cache [ cacheKey ] . path = path . join ( cacheStore . specsCache , `${ cache [ cacheKey ] . hash } .json` ) ;
267267
268- delete cache [ '44ec0da6e10c8806831ba3d4126c1b66' ] . hash ;
268+ delete cache [ cacheKey ] . hash ;
269269
270270 expect ( Object . keys ( cache ) ) . toHaveLength ( 1 ) ;
271271
You can’t perform that action at this time.
0 commit comments