Skip to content

Function: serializeSemanticSnapshot()

@termwright/test


@termwright/test / serializeSemanticSnapshot

serializeSemanticSnapshot(snapshot, options?): string

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

Renders the snapshot as YAML.

SemanticSnapshot

SerializeOptions = {}

string

the tree, one node per line, newline-terminated; '' for a tree with no visible nodes.

const yaml = serializeSemanticSnapshot(terminal.semanticTree()!);
// - dialog "Permission" [modal]:
// - button "Approve" [focused]