fix: use node dist/cli.js instead of npx tsx in prompt help test
CI / check (pull_request) Failing after 3m40s

npx tsx fails in CI (tsx not found, npm tries to install it)
This commit is contained in:
2026-06-04 11:32:09 +00:00
parent d26f54e8ea
commit 596c05bfcc
+3 -3
View File
@@ -89,10 +89,10 @@ describe("prompt commands", () => {
});
test("prompt help subcommand is suppressed", { timeout: 30_000 }, () => {
const output = execFileSync("npx", ["tsx", "src/cli.ts", "prompt", "--help"], {
cwd: join(__dirname, "..", ".."),
const cliPath = join(__dirname, "..", "..", "dist", "cli.js");
const output = execFileSync("node", [cliPath, "prompt", "--help"], {
encoding: "utf-8",
env: { ...process.env, PATH: `/opt/homebrew/bin:${process.env.PATH}` },
env: { ...process.env },
});
expect(output).not.toMatch(/help\s+\[command\]/i);
expect(output).toContain("usage");