Skip to content

Commit b5340b0

Browse files
committed
Merge main test stabilizations into live-daemon recovery
2 parents 6b4c63b + 6345859 commit b5340b0

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

tests/nesting.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,9 @@ describe("pty nesting prevention", () => {
169169
expect(found).toBeDefined();
170170
expect(found.status).toBe("running");
171171

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

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

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

tests/screenshot.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,11 +710,13 @@ describe("screenshot: alternate screen buffer", () => {
710710
"printf 'alt-screen-only';" +
711711
"sleep 0.3;" +
712712
"printf '\\033[?1049l';" +
713+
"echo 'main-buffer-restored';" +
713714
"sleep 30",
714715
]);
715716

716-
const ss = await session.waitForText("main-buffer-text");
717+
const ss = await session.waitForText("main-buffer-restored");
717718
expect(ss.text).toContain("main-buffer-text");
719+
expect(ss.text).toContain("main-buffer-restored");
718720
// Alt screen content should NOT appear in the main buffer
719721
expect(ss.text).not.toContain("alt-screen-only");
720722
});

0 commit comments

Comments
 (0)