Skip to content

Commit 20f78fd

Browse files
committed
test: stabilize release-blocking smoke checks
1 parent 23a9d3b commit 20f78fd

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

test/tty-render-smoke.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
33
import { tmpdir } from "node:os";
44
import { join } from "node:path";
55

6+
const repoRoot = process.cwd();
7+
const sourceEntrypoint = join(repoRoot, "src/main.tsx");
68
const tempDirs: string[] = [];
79
const ttyToolsAvailable = Bun.spawnSync(["bash", "-lc", "command -v script >/dev/null && command -v timeout >/dev/null"], {
810
stdin: "ignore",
@@ -117,9 +119,9 @@ async function runTtySmoke(options: { mode?: "split" | "stack"; pager?: boolean;
117119
args.push("--agent-context", fixture.agent);
118120
}
119121

120-
const command = `timeout 2 bun run src/main.tsx ${args.map(shellQuote).join(" ")}`;
122+
const command = `timeout 2 bun run ${shellQuote(sourceEntrypoint)} ${args.map(shellQuote).join(" ")}`;
121123
const proc = Bun.spawnSync(["script", "-q", "-f", "-e", "-c", command, transcript], {
122-
cwd: process.cwd(),
124+
cwd: fixture.dir,
123125
stdin: "ignore",
124126
stdout: "pipe",
125127
stderr: "pipe",
@@ -141,11 +143,11 @@ async function runStdinPagerSmoke(options?: { input?: string; inputCommand?: str
141143
const fixture = createFixtureFiles(options?.lines ?? 1);
142144
const transcript = join(fixture.dir, "stdin-pager-transcript.txt");
143145
const subcommand = options?.command === "pager" ? "pager" : "patch -";
144-
const patchCommand = `cat ${shellQuote(fixture.coloredPatch)} | bun run src/main.tsx ${subcommand}`;
146+
const patchCommand = `cat ${shellQuote(fixture.coloredPatch)} | bun run ${shellQuote(sourceEntrypoint)} ${subcommand}`;
145147
const scriptCommand = `timeout 5 script -q -f -e -c ${shellQuote(patchCommand)} ${shellQuote(transcript)}`;
146148
const inputCommand = options?.inputCommand ?? `(sleep 1; printf ${shellQuote(options?.input ?? "q")})`;
147149
const proc = Bun.spawnSync(["bash", "-lc", `${inputCommand} | ${scriptCommand}`], {
148-
cwd: process.cwd(),
150+
cwd: fixture.dir,
149151
stdin: "ignore",
150152
stdout: "pipe",
151153
stderr: "pipe",

test/ui-components.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ describe("UI components", () => {
447447
expect(frame).toContain("1 + export const messag");
448448
expect(frame).toContain("e = 'this is a very");
449449
expect(frame).toContain("long wrapped line");
450-
expect(frame).toContain("for diff rendering");
450+
expect(frame).toContain("coverage';");
451451
});
452452

453453
test("DiffPane can hide hunk metadata rows without hiding code lines", async () => {

0 commit comments

Comments
 (0)