Skip to content

Interface: SemanticSnapshotMatcherOptions

@termwright/test


@termwright/test / SemanticSnapshotMatcherOptions

Defined in: test/src/matchers.ts:74

Options for TermwrightMatchers.toMatchSemanticSnapshot.

readonly optional rootId?: string

Defined in: test/src/matchers.ts:86

Snapshot this node’s subtree, the node included. Mutually exclusive with within.


readonly optional states?: StateSelection

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

Which state flags a written snapshot records. Default stable.


readonly optional timeout?: number

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

Milliseconds to keep re-probing. Defaults to the expect timeout class.

PollOptions.timeout


readonly optional within?: AnyLocator

Defined in: test/src/matchers.ts:84

Match the pattern against what is inside this locator.

The node itself is not part of the pattern, so a test can assert a dialog’s contents without restating the application and region nodes above it — the usual shape for Ink and Textual apps, whose tree is rooted at application. Re-resolved on every attempt, so a re-render that mints new node ids does not invalidate the scope.