@@ -55,25 +55,31 @@ describe("detectWindowsHostOllama", () => {
5555 expect ( runCapture ) . not . toHaveBeenCalled ( ) ;
5656 } ) ;
5757
58- it ( "returns uninstalled when all Windows Ollama probes miss " , ( ) => {
58+ it ( "returns absent state when Windows-host probes do not respond (#9604) " , ( ) => {
5959 runCapture . mockImplementation ( ( ) => "" ) ;
6060
6161 expect ( detectWindowsHostOllama ( { isWsl : ( ) => true , runCapture } ) ) . toEqual ( {
6262 installed : false ,
6363 installedPath : "" ,
6464 loopbackOnly : false ,
6565 } ) ;
66+ expect ( runCapture ) . toHaveBeenCalledTimes ( 3 ) ;
67+ expect ( runCapture . mock . calls . map ( ( [ , options ] ) => options ) ) . toEqual ( [
68+ { ignoreError : true , timeout : 5_000 } ,
69+ { ignoreError : true , timeout : 5_000 } ,
70+ { ignoreError : true , timeout : 5_000 } ,
71+ ] ) ;
6672 } ) ;
6773
68- it ( "bounds each Windows-host PowerShell probe when the host does not respond (#9604)" , ( ) => {
74+ it ( "continues when the Windows-host port probe does not respond (#9604)" , ( ) => {
6975 const installedPath = "C:\\Users\\tester\\AppData\\Local\\Programs\\Ollama\\ollama.exe" ;
70- const outputs = [ installedPath , "42" , "127.0.0.1 " ] ;
76+ const outputs = [ installedPath , "42" , "" ] ;
7177 runCapture . mockImplementation ( ( ) => outputs . shift ( ) ?? "" ) ;
7278
7379 expect ( detectWindowsHostOllama ( ) ) . toEqual ( {
7480 installed : true ,
7581 installedPath,
76- loopbackOnly : true ,
82+ loopbackOnly : false ,
7783 } ) ;
7884 expect ( runCapture ) . toHaveBeenCalledTimes ( 3 ) ;
7985 expect ( runCapture . mock . calls . map ( ( [ , options ] ) => options ) ) . toEqual ( [
0 commit comments