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 }, () => {
|
test("prompt help subcommand is suppressed", { timeout: 30_000 }, () => {
|
||||||
const output = execFileSync("npx", ["tsx", "src/cli.ts", "prompt", "--help"], {
|
const cliPath = join(__dirname, "..", "..", "dist", "cli.js");
|
||||||
cwd: join(__dirname, "..", ".."),
|
const output = execFileSync("node", [cliPath, "prompt", "--help"], {
|
||||||
encoding: "utf-8",
|
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).not.toMatch(/help\s+\[command\]/i);
|
||||||
expect(output).toContain("usage");
|
expect(output).toContain("usage");
|
||||||
|
|||||||
Reference in New Issue
Block a user