Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tests/nesting.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,9 @@ describe("pty nesting prevention", () => {
expect(found).toBeDefined();
expect(found.status).toBe("running");

// Clean up the daemon
try { process.kill(found.pid, "SIGTERM"); } catch {}
// Let the awaited teardown barrier stop this detached daemon before the
// suite removes its session root.
bgPids.push(found.pid);
}, 15000);

it("propagates exit code from nested command", () => {
Expand Down Expand Up @@ -207,7 +208,8 @@ describe("pty nesting prevention", () => {
const found = sessions.find((s: any) => s.name === name);
expect(found).toBeDefined();

// Clean up the daemon
try { process.kill(found.pid, "SIGTERM"); } catch {}
// Let the awaited teardown barrier stop this detached daemon before the
// suite removes its session root.
bgPids.push(found.pid);
}, 15000);
});
4 changes: 3 additions & 1 deletion tests/screenshot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -710,11 +710,13 @@ describe("screenshot: alternate screen buffer", () => {
"printf 'alt-screen-only';" +
"sleep 0.3;" +
"printf '\\033[?1049l';" +
"echo 'main-buffer-restored';" +
"sleep 30",
]);

const ss = await session.waitForText("main-buffer-text");
const ss = await session.waitForText("main-buffer-restored");
expect(ss.text).toContain("main-buffer-text");
expect(ss.text).toContain("main-buffer-restored");
// Alt screen content should NOT appear in the main buffer
expect(ss.text).not.toContain("alt-screen-only");
});
Expand Down
Loading