Skip to content

Interface: LaunchFixtureOptions

@termwright/test


@termwright/test / LaunchFixtureOptions

Defined in: test/src/fixtures.ts:71

What a test may override when launching a program.

  • Omit<LaunchOptions, "command" | "operationBudget">

readonly optional artifactSecurity?: ArtifactSecurityPolicy

Defined in: driver/dist/session-DOkKra9W.d.ts:90

One policy for every artifact boundary. Defaults to secure redacted.

Omit.artifactSecurity


readonly optional columns?: number

Defined in: driver/dist/session-DOkKra9W.d.ts:68

Omit.columns


readonly optional command?: readonly string[]

Defined in: test/src/fixtures.ts:73

Defaults to config.command.


readonly optional cwd?: string

Defined in: driver/dist/session-DOkKra9W.d.ts:44

Omit.cwd


readonly optional debug?: boolean

Defined in: driver/dist/session-DOkKra9W.d.ts:52

Streams a live log of API calls, waits, revisions and diagnostics to stderr. Also enabled by TERMWRIGHT_DEBUG=1 (=all adds raw PTY traffic).

Omit.debug


readonly optional env?: Readonly<Record<string, string>>

Defined in: driver/dist/session-DOkKra9W.d.ts:45

Omit.env


readonly optional envMode?: EnvMode

Defined in: driver/dist/session-DOkKra9W.d.ts:47

Defaults to 'replace': a test process’s secrets are not the child’s.

Omit.envMode


readonly optional files?: Readonly<Record<string, SeedFile>>

Defined in: test/src/fixtures.ts:85

Files to create in the working directory before the program starts, keyed by relative path. Directories are created as needed.

await terminal.launch({
files: { 'config.json': '{"theme":"dark"}', 'notes/todo.md': '- write tests\n' },
});

readonly optional logs?: readonly AppLogSource[]

Defined in: driver/dist/session-DOkKra9W.d.ts:58

Log files to follow for the lifetime of the session. A file that does not exist yet is waited for; one that already exists is followed from its current end, so a session never replays a previous run.

Omit.logs


readonly optional recording?: RecordingOptions

Defined in: driver/dist/session-DOkKra9W.d.ts:88

Omit.recording


readonly optional requiredCapabilities?: readonly ("focus" | "pointer-input" | "semantic-tree" | "stable-identity" | "intended-geometry" | "clipped-geometry" | "painted-region" | "pointer-geometry" | "pointer-hit-testing" | "scroll" | "render-order" | "action-strategies" | "keyboard-input" | "focus-input" | "paired-revisions")[]

Defined in: driver/dist/session-DOkKra9W.d.ts:101

Capabilities that must be present in the frozen session contract. Launch waits for negotiation and throws CapabilityUnavailableError before returning a harness when any requirement is missing.

Omit.requiredCapabilities


readonly optional rows?: number

Defined in: driver/dist/session-DOkKra9W.d.ts:69

Omit.rows


readonly optional scrollbackLines?: number

Defined in: driver/dist/session-DOkKra9W.d.ts:85

Omit.scrollbackLines


readonly optional semanticFrameQueueCapacity?: number

Defined in: driver/dist/session-DOkKra9W.d.ts:84

Negotiated ceiling for semantic frames in flight between a framework probe and the driver. Defaults to 32 and is capped at 256. Compatible probes may use it as their publication budget; a full queue still fails closed instead of dropping or retrying a semantic revision.

Omit.semanticFrameQueueCapacity


readonly optional semanticNegotiationMs?: number

Defined in: driver/dist/session-DOkKra9W.d.ts:77

Maximum time to discover an optional semantic adapter. Defaults to 2,000 ms for generic auto-detection. A peer accepted within that window keeps its own bounded hello deadline; peers first seen afterwards are refused. When requiredCapabilities is non-empty, the default discovery budget is the larger of 2,000 ms and the session ready timeout.

Omit.semanticNegotiationMs


readonly optional shellIntegration?: "external" | "termwright-posix" | "termwright-powershell"

Defined in: driver/dist/session-DOkKra9W.d.ts:95

Termwright-managed modes instrument an interactive shell with exact command markers. Test authors should normally use terminal.openShell().

Omit.shellIntegration


readonly optional template?: string | SeedTemplate

Defined in: test/src/fixtures.ts:90

A directory to copy in first, so a test can start from a whole project and change only what it is about. files are written over it.


readonly optional terminalProfile?: TerminalProfileId

Defined in: driver/dist/session-DOkKra9W.d.ts:67

Terminal profile: which width tables and which of the switches terminals disagree on this session uses. The built-in ids are 'default' and 'cjk-wide'.

It is recorded with the session so a replay, a screenshot and the runner pane can count characters exactly as the live session did.

Omit.terminalProfile


readonly optional timeouts?: TimeoutClasses

Defined in: driver/dist/session-DOkKra9W.d.ts:86

Omit.timeouts


readonly optional trace?: TraceMode

Defined in: test/src/fixtures.ts:92

Trace policy for this session, overriding the file’s and the project’s.