Interface: TermwrightConfig
@termwright/test / TermwrightConfig
Interface: TermwrightConfig
Section titled “Interface: TermwrightConfig”Defined in: test/src/config.ts:55
User-facing configuration. Every field has a documented default.
Properties
Section titled “Properties”columns?
Section titled “columns?”
readonlyoptionalcolumns?:number
Defined in: test/src/config.ts:57
Viewport width in cells. Default 100.
command?
Section titled “command?”
readonlyoptionalcommand?: readonlystring[]
Defined in: test/src/config.ts:69
Default command for terminal.launch() when the test passes none.
readonlyoptionalenv?:Readonly<Record<string,string>>
Defined in: test/src/config.ts:73
Extra environment for launched programs. Merged after the palette’s.
failOnLogLevel?
Section titled “failOnLogLevel?”
readonlyoptionalfailOnLogLevel?: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.
outputDir?
Section titled “outputDir?”
readonlyoptionaloutputDir?:string
Defined in: test/src/config.ts:65
Where traces and the HTML report are written. Default termwright-report.
palette?
Section titled “palette?”
readonlyoptionalpalette?:ColorPalette
Defined in: test/src/config.ts:77
Deterministic palette; also decorates cell snapshots with color names.
profiles?
Section titled “profiles?”
readonlyoptionalprofiles?:Readonly<Record<string,Omit<TermwrightConfig,"profiles">>>
Defined in: test/src/config.ts:79
Overrides selected by the TERMWRIGHT_PROFILE environment variable.
requiredCapabilities?
Section titled “requiredCapabilities?”
readonlyoptionalrequiredCapabilities?: 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.
readonlyoptionalrows?:number
Defined in: test/src/config.ts:59
Viewport height in cells. Default 30.
snapshotDir?
Section titled “snapshotDir?”
readonlyoptionalsnapshotDir?:string
Defined in: test/src/config.ts:67
Snapshot directory, relative to the test file. Default __snapshots__.
terminalProfile?
Section titled “terminalProfile?”
readonlyoptionalterminalProfile?:TerminalProfileId
Defined in: test/src/config.ts:75
Character-width and terminal behavior profile used by the emulator.
timeouts?
Section titled “timeouts?”
readonlyoptionaltimeouts?:TestTimeoutClasses
Defined in: test/src/config.ts:61
Timeout classes forwarded to the driver, plus the expect class.
trace?
Section titled “trace?”
readonlyoptionaltrace?:TraceMode
Defined in: test/src/config.ts:63
Trace collection policy. Default retain-on-failure.
updateSnapshots?
Section titled “updateSnapshots?”
readonlyoptionalupdateSnapshots?: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.