Skip to content
Merged
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
11 changes: 10 additions & 1 deletion tests/screenshot.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, it, expect, afterEach, afterAll } from "vitest";
import { describe, it, expect, afterEach, afterAll, vi } from "vitest";
import * as net from "node:net";
import * as fs from "node:fs";
import * as os from "node:os";
Expand All @@ -15,6 +15,15 @@ import {
} from "../src/protocol.ts";
import { getSocketPath, cleanupAll } from "../src/sessions.ts";

// Every test here spawns a real pty session and polls the rendered screen
// (createSession + waitForText). The default 5000ms per-test timeout is too
// tight for that under CI load — the vitest gate flaked once on main when
// "preserves true color" timed out at 5s (it passed on re-run). Raise the whole
// file to the 15000ms already used by this file's known-slower tests so a
// loaded runner can't false-red a real-pty screenshot test. (A per-test
// timeout arg still overrides this.)
vi.setConfig({ testTimeout: 15000 });

// All tests run in a tmp directory to avoid polluting the project
const testCwd = fs.mkdtempSync(path.join(os.tmpdir(), "pty-ss-"));
// Isolate session metadata/sockets from the real session directory
Expand Down
Loading