Skip to content

Interface: TermwrightConfig

@termwright/test


@termwright/test / TermwrightConfig

Defined in: test/src/config.ts:55

User-facing configuration. Every field has a documented default.

readonly optional columns?: number

Defined in: test/src/config.ts:57

Viewport width in cells. Default 100.


readonly optional command?: readonly string[]

Defined in: test/src/config.ts:69

Default command for terminal.launch() when the test passes none.


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

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

Extra environment for launched programs. Merged after the palette’s.


readonly optional failOnLogLevel?: false | "trace" | "debug" | "info" | "warn" | "error" | "fatal"

Defined in: test/src/config.ts:88

Fail an otherwise passing test when the program logged a record at this level or above. Default 'error'; false turns the check off.

This is the negative assertion nobody writes: a test that clicks through a flow while the program logs error: failed to save is not a passing test, it is a test that did not look.


readonly optional outputDir?: string

Defined in: test/src/config.ts:65

Where traces and the HTML report are written. Default termwright-report.


readonly optional palette?: ColorPalette

Defined in: test/src/config.ts:77

Deterministic palette; also decorates cell snapshots with color names.


readonly optional profiles?: Readonly<Record<string, Omit<TermwrightConfig, "profiles">>>

Defined in: test/src/config.ts:79

Overrides selected by the TERMWRIGHT_PROFILE environment variable.


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: test/src/config.ts:71

Capabilities every launched session must negotiate before it is returned.


readonly optional rows?: number

Defined in: test/src/config.ts:59

Viewport height in cells. Default 30.


readonly optional snapshotDir?: string

Defined in: test/src/config.ts:67

Snapshot directory, relative to the test file. Default __snapshots__.


readonly optional terminalProfile?: TerminalProfileId

Defined in: test/src/config.ts:75

Character-width and terminal behavior profile used by the emulator.


readonly optional timeouts?: TestTimeoutClasses

Defined in: test/src/config.ts:61

Timeout classes forwarded to the driver, plus the expect class.


readonly optional trace?: TraceMode

Defined in: test/src/config.ts:63

Trace collection policy. Default retain-on-failure.


readonly optional updateSnapshots?: UpdateSnapshotsMode

Defined in: test/src/config.ts:93

Snapshot policy. Normally left unset: it is derived per run from TERMWRIGHT_UPDATE_SNAPSHOTS or Vitest’s --update flag.