@@ -275,7 +275,7 @@ describe('Beta Channel Implementation (Phase 3)', function () {
275275 latest_version : null ,
276276 dismissed_version : null
277277 } ;
278- mockFileSystem [ path . join ( os . homedir ( ) , '.ccs' , 'update-check.json' ) ] = JSON . stringify ( cacheData ) ;
278+ mockFileSystem [ path . join ( os . homedir ( ) , '.ccs' , 'cache' , ' update-check.json') ] = JSON . stringify ( cacheData ) ;
279279 } ) ;
280280
281281 it ( 'should use latest tag when targetTag is "latest"' , async function ( ) {
@@ -362,7 +362,7 @@ describe('Beta Channel Implementation (Phase 3)', function () {
362362 await updateCheckerModule . checkForUpdates ( '5.4.0' , true , 'npm' , 'dev' ) ;
363363
364364 // Check cache was updated with dev version
365- const cachePath = path . join ( os . homedir ( ) , '.ccs' , 'update-check.json' ) ;
365+ const cachePath = path . join ( os . homedir ( ) , '.ccs' , 'cache' , ' update-check.json') ;
366366 const cacheData = JSON . parse ( mockFileSystem [ cachePath ] ) ;
367367
368368 assert . strictEqual ( cacheData . latest_version , '5.5.0' ) ;
@@ -376,7 +376,7 @@ describe('Beta Channel Implementation (Phase 3)', function () {
376376 latest_version : '5.5.0' ,
377377 dismissed_version : null
378378 } ;
379- mockFileSystem [ path . join ( os . homedir ( ) , '.ccs' , 'update-check.json' ) ] = JSON . stringify ( cacheData ) ;
379+ mockFileSystem [ path . join ( os . homedir ( ) , '.ccs' , 'cache' , ' update-check.json') ] = JSON . stringify ( cacheData ) ;
380380
381381 // Call with force=false to use cache
382382 const result = await updateCheckerModule . checkForUpdates ( '5.4.0' , false , 'npm' , 'dev' ) ;
@@ -465,7 +465,7 @@ describe('Beta Channel Implementation (Phase 3)', function () {
465465 describe ( 'Cache functionality' , function ( ) {
466466 it ( 'should create cache directory if not exists' , async function ( ) {
467467 // Ensure no cache exists
468- const cacheDir = path . join ( os . homedir ( ) , '.ccs' ) ;
468+ const cacheDir = path . join ( os . homedir ( ) , '.ccs' , 'cache' ) ;
469469 delete mockFileSystem [ cacheDir ] ;
470470
471471 await updateCheckerModule . checkForUpdates ( '5.4.0' , true , 'npm' , 'latest' ) ;
@@ -481,7 +481,7 @@ describe('Beta Channel Implementation (Phase 3)', function () {
481481 latest_version : '5.5.0' ,
482482 dismissed_version : '5.5.0'
483483 } ;
484- mockFileSystem [ path . join ( os . homedir ( ) , '.ccs' , 'update-check.json' ) ] = JSON . stringify ( cacheData ) ;
484+ mockFileSystem [ path . join ( os . homedir ( ) , '.ccs' , 'cache' , ' update-check.json') ] = JSON . stringify ( cacheData ) ;
485485
486486 const result = await updateCheckerModule . checkForUpdates ( '5.4.1' , false , 'npm' , 'dev' ) ;
487487
@@ -492,7 +492,7 @@ describe('Beta Channel Implementation (Phase 3)', function () {
492492
493493 it ( 'should handle corrupted cache gracefully' , async function ( ) {
494494 // Set up corrupted cache
495- mockFileSystem [ path . join ( os . homedir ( ) , '.ccs' , 'update-check.json' ) ] = 'invalid json' ;
495+ mockFileSystem [ path . join ( os . homedir ( ) , '.ccs' , 'cache' , ' update-check.json') ] = 'invalid json' ;
496496
497497 // Should not throw error
498498 const result = await updateCheckerModule . checkForUpdates ( '5.4.0' , true , 'npm' , 'latest' ) ;
0 commit comments