@@ -6,7 +6,7 @@ import { tmpdir } from "os";
66import { join } from "path" ;
77import { promisify } from "util" ;
88import { afterAll , beforeAll , describe , expect , test } from "vite-plus/test" ;
9- import { cliPackageRoot } from "./helpers.ts" ;
9+ import { cliPackageRoot , localBin } from "./helpers.ts" ;
1010
1111const execFileAsync = promisify ( execFile ) ;
1212
@@ -54,7 +54,7 @@ beforeAll(async () => {
5454 proxyUrl = `http://127.0.0.1:${ ( proxy . address ( ) as AddressInfo ) . port } ` ;
5555
5656 scriptDir = mkdtempSync ( join ( tmpdir ( ) , "bl-proxy-e2e-" ) ) ;
57- scriptPath = join ( scriptDir , "probe.ts " ) ;
57+ scriptPath = join ( scriptDir , "probe.mts " ) ;
5858 writeFileSync ( scriptPath , PROBE_SCRIPT ) ;
5959} ) ;
6060
@@ -75,7 +75,7 @@ async function runProbe(
7575 envOverrides : NodeJS . ProcessEnv ,
7676) : Promise < { exitCode : number ; stderr : string } > {
7777 try {
78- await execFileAsync ( "node" , [ scriptPath ] , {
78+ await execFileAsync ( localBin ( "tsx" ) , [ scriptPath ] , {
7979 cwd : cliPackageRoot ,
8080 encoding : "utf8" ,
8181 env : { ...process . env , NODE_NO_WARNINGS : "1" , ...PROXY_ENV_CLEARED , ...envOverrides } ,
0 commit comments