@@ -826,16 +826,18 @@ describe("manual-install hints are copy-pasteable", () => {
826826 expect ( prefix ! . startsWith ( "'" ) || prefix ! . startsWith ( '"' ) ) . toBe ( true )
827827 } )
828828
829- test ( "DriverNotInstalledError names a location when nothing was searched" , ( ) => {
830- process . env [ "ALTIMATE_DRIVER_DIR" ] = path . join ( path . sep , "tmp" , "altimate-drivers-absent" )
829+ test ( "DriverNotInstalledError names a location for an empty searched list" , ( ) => {
830+ const installDir = path . join ( tmpRoot , "absent" )
831+ process . env [ "ALTIMATE_DRIVER_DIR" ] = installDir
831832
832- // The first-run state: no driver directory exists, so driverSearchRoots()
833- // returns nothing. The message must still name somewhere.
833+ // Model the possible empty-root result directly. A unit-test checkout has
834+ // legitimate executable/package roots, so forcing driverSearchRoots() to
835+ // return [] here would be host-dependent.
834836 const err = new DriverNotInstalledError ( "duckdb" , DRIVER_PACKAGES . duckdb , [ ] )
835837
836838 expect ( err . message ) . not . toContain ( "Searched 0 locations:" )
837- expect ( err . message ) . toContain ( "Searched nothing " )
838- expect ( err . message ) . toContain ( path . join ( "altimate-drivers-absent" , "node_modules" ) )
839+ expect ( err . message ) . toContain ( "No searchable driver locations were found. " )
840+ expect ( err . message ) . toContain ( `Expected managed location: ${ path . join ( installDir , "node_modules" ) } .` )
839841 // Still distinguishable from a broken install, and still actionable.
840842 expect ( err . message ) . toContain ( "DuckDB driver not installed." )
841843 expect ( err . message ) . toContain ( "npm install --prefix" )
0 commit comments