fix: use node dist/cli.js instead of npx tsx in prompt help test
CI / check (pull_request) Failing after 3m40s
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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user