Skip to content

API Reference / @gtkx/testing / prettyWidget

Variable: prettyWidget ​

const prettyWidget: (container, options?) => string

Defined in: packages/testing/dist/pretty-widget.d.ts:30

Renders a widget tree as an indented, HTML-like string showing each widget's tag, accessible attributes, and text content.

Parameters ​

container ​

Container

The scope whose widget tree is formatted.

options? ​

PrettyWidgetOptions

Formatting options such as truncation length and highlighting.

Returns ​

string

The formatted representation of the tree.