@@ -59,9 +59,12 @@ describe("pickExtensionPackModelFile", () => {
5959 } )
6060 ) . path ;
6161
62- extensionPackPath = join ( tmpDir , "my-extension-pack" ) ;
63- anotherExtensionPackPath = join ( tmpDir , "another-extension-pack" ) ;
64- autoExtensionPackPath = join ( tmpDir , "vscode-codeql-java" ) ;
62+ // Uri.file(...).fsPath normalizes the filenames so we can properly compare them on Windows
63+ extensionPackPath = Uri . file ( join ( tmpDir , "my-extension-pack" ) ) . fsPath ;
64+ anotherExtensionPackPath = Uri . file (
65+ join ( tmpDir , "another-extension-pack" ) ,
66+ ) . fsPath ;
67+ autoExtensionPackPath = Uri . file ( join ( tmpDir , "vscode-codeql-java" ) ) . fsPath ;
6568
6669 qlPacks = {
6770 "my-extension-pack" : [ extensionPackPath ] ,
@@ -116,7 +119,7 @@ describe("pickExtensionPackModelFile", () => {
116119 name : "codeql-custom-queries-java" ,
117120 index : 0 ,
118121 } ;
119- additionalPacks = [ tmpDir ] ;
122+ additionalPacks = [ Uri . file ( tmpDir ) . fsPath ] ;
120123 workspaceFoldersSpy = jest
121124 . spyOn ( workspace , "workspaceFolders" , "get" )
122125 . mockReturnValue ( [ workspaceFolder ] ) ;
@@ -331,7 +334,7 @@ describe("pickExtensionPackModelFile", () => {
331334 } ,
332335 ] ) ;
333336
334- const newPackDir = join ( tmpDir . path , "vscode-codeql-java" ) ;
337+ const newPackDir = join ( Uri . file ( tmpDir . path ) . fsPath , "vscode-codeql-java" ) ;
335338
336339 const cliServer = mockCliServer ( { } , { models : [ ] , data : { } } ) ;
337340
@@ -409,7 +412,7 @@ describe("pickExtensionPackModelFile", () => {
409412 unsafeCleanup : true ,
410413 } ) ;
411414
412- const newPackDir = join ( tmpDir . path , "new-extension-pack" ) ;
415+ const newPackDir = join ( Uri . file ( tmpDir . path ) . fsPath , "new-extension-pack" ) ;
413416
414417 showQuickPickSpy . mockResolvedValueOnce ( {
415418 label : "codeql-custom-queries-java" ,
@@ -485,7 +488,7 @@ describe("pickExtensionPackModelFile", () => {
485488 unsafeCleanup : true ,
486489 } ) ;
487490
488- const newPackDir = join ( tmpDir . path , "new-extension-pack" ) ;
491+ const newPackDir = join ( Uri . file ( tmpDir . path ) . fsPath , "new-extension-pack" ) ;
489492
490493 showQuickPickSpy . mockResolvedValueOnce ( {
491494 label : "codeql-custom-queries-java" ,
0 commit comments