@@ -228,8 +228,11 @@ describe("SimpleInstaller", () => {
228228 await installer . removeItem ( mockModeItem , { target : "project" } )
229229
230230 expect ( mockCustomModesManager . deleteCustomMode ) . toHaveBeenCalledWith ( "test" )
231- expect ( fileExistsAtPath ) . toHaveBeenCalledWith ( "/test/workspace/.roo/rules-test" )
232- expect ( mockFs . rm ) . toHaveBeenCalledWith ( "/test/workspace/.roo/rules-test" , { recursive : true , force : true } )
231+ expect ( fileExistsAtPath ) . toHaveBeenCalledWith ( path . join ( "/test/workspace" , ".roo" , "rules-test" ) )
232+ expect ( mockFs . rm ) . toHaveBeenCalledWith ( path . join ( "/test/workspace" , ".roo" , "rules-test" ) , {
233+ recursive : true ,
234+ force : true ,
235+ } )
233236 } )
234237
235238 it ( "should handle global mode removal with rules cleanup" , async ( ) => {
@@ -243,8 +246,11 @@ describe("SimpleInstaller", () => {
243246 await installer . removeItem ( mockModeItem , { target : "global" } )
244247
245248 expect ( mockCustomModesManager . deleteCustomMode ) . toHaveBeenCalledWith ( "test" )
246- expect ( fileExistsAtPath ) . toHaveBeenCalledWith ( "/home/user/.roo/rules-test" )
247- expect ( mockFs . rm ) . toHaveBeenCalledWith ( "/home/user/.roo/rules-test" , { recursive : true , force : true } )
249+ expect ( fileExistsAtPath ) . toHaveBeenCalledWith ( path . join ( "/home/user" , ".roo" , "rules-test" ) )
250+ expect ( mockFs . rm ) . toHaveBeenCalledWith ( path . join ( "/home/user" , ".roo" , "rules-test" ) , {
251+ recursive : true ,
252+ force : true ,
253+ } )
248254 } )
249255
250256 it ( "should handle case when rules folder does not exist" , async ( ) => {
@@ -258,7 +264,7 @@ describe("SimpleInstaller", () => {
258264 await installer . removeItem ( mockModeItem , { target : "project" } )
259265
260266 expect ( mockCustomModesManager . deleteCustomMode ) . toHaveBeenCalledWith ( "test" )
261- expect ( fileExistsAtPath ) . toHaveBeenCalledWith ( "/test/workspace/ .roo/ rules-test" )
267+ expect ( fileExistsAtPath ) . toHaveBeenCalledWith ( path . join ( "/test/workspace" , " .roo" , " rules-test") )
262268 expect ( mockFs . rm ) . not . toHaveBeenCalled ( )
263269 } )
264270
0 commit comments