@@ -29,20 +29,20 @@ describe("importRooTaskHistory", () => {
2929 const zooCustomStoragePath = path . join ( tempRoot , "zoo-custom" )
3030 const getConfigurationMock = vi . mocked ( vscode . workspace . getConfiguration )
3131
32- getConfigurationMock . mockImplementation (
33- ( section : string ) =>
34- ( {
35- get : vi
36- . fn ( )
37- . mockReturnValue (
38- section === "roo-cline"
39- ? rooCustomStoragePath
40- : section === "zoo-code"
41- ? zooCustomStoragePath
42- : "" ,
43- ) ,
44- } ) as any ,
45- )
32+ getConfigurationMock . mockImplementation ( ( section ?: string ) => {
33+ const resolvedSection = section ?? ""
34+ return {
35+ get : vi
36+ . fn ( )
37+ . mockReturnValue (
38+ resolvedSection === "roo-cline"
39+ ? rooCustomStoragePath
40+ : resolvedSection === "zoo-code"
41+ ? zooCustomStoragePath
42+ : "" ,
43+ ) ,
44+ } as any
45+ } )
4646
4747 const result = await resolveRooHistoryImportPaths ( zooGlobalStoragePath )
4848
@@ -62,20 +62,20 @@ describe("importRooTaskHistory", () => {
6262 const zooCustomStorageRoot = path . join ( tempRoot , "zoo-custom" )
6363 const getConfigurationMock = vi . mocked ( vscode . workspace . getConfiguration )
6464
65- getConfigurationMock . mockImplementation (
66- ( section : string ) =>
67- ( {
68- get : vi
69- . fn ( )
70- . mockReturnValue (
71- section === "roo-cline"
72- ? rooCustomStorageRoot
73- : section === "zoo-code"
74- ? zooCustomStorageRoot
75- : "" ,
76- ) ,
77- } ) as any ,
78- )
65+ getConfigurationMock . mockImplementation ( ( section ?: string ) => {
66+ const resolvedSection = section ?? ""
67+ return {
68+ get : vi
69+ . fn ( )
70+ . mockReturnValue (
71+ resolvedSection === "roo-cline"
72+ ? rooCustomStorageRoot
73+ : resolvedSection === "zoo-code"
74+ ? zooCustomStorageRoot
75+ : "" ,
76+ ) ,
77+ } as any
78+ } )
7979
8080 await fs . mkdir ( path . join ( rooDefaultStorageRoot , "tasks" , "task-default" ) , { recursive : true } )
8181 await fs . writeFile (
0 commit comments