Skip to content

Interface: SerializeOptions

@termwright/test


@termwright/test / SerializeOptions

Defined in: test/src/yaml-serialize.ts:21

Options for serializeSemanticSnapshot.

readonly optional includeRoot?: boolean

Defined in: test/src/yaml-serialize.ts:39

With rootId, whether that node is itself the top level (default) or only the parent of it — false serializes what is inside the node, which is what scoping to a container is normally for.


readonly optional indent?: number

Defined in: test/src/yaml-serialize.ts:31

Indentation per level, in spaces. Default 4, matching the contract.


readonly optional rootId?: string

Defined in: test/src/yaml-serialize.ts:33

Serialize this node and its descendants instead of the whole tree.


readonly optional skipHidden?: boolean

Defined in: test/src/yaml-serialize.ts:41

Drop nodes carrying state.hidden. Default false.


readonly optional states?: StateSelection

Defined in: test/src/yaml-serialize.ts:29

State keys to emit.

stable (default) skips positional and scroll states, which change on every repaint and would make snapshots churn; all emits every key set by the adapter; an explicit list pins exactly what the test cares about.