Skip to content

API Reference / @gtkx/testing / MatcherOptions

Type Alias: MatcherOptions<T>

MatcherOptions<T> = object & WaitForOptions

Defined in: packages/testing/dist/types.d.ts:39

Options controlling text matching and, for asynchronous queries, polling behavior.

Type Declaration

as?

optional as?: WidgetType<T>

Restricts matches to instances of this widget class, and narrows the query's return type to it.

collapseWhitespace?

optional collapseWhitespace?: boolean

Forwarded to the default normalizer when no custom normalizer is given.

exact?

optional exact?: boolean

When true (the default), require an exact match; when false, match case-insensitively as a substring.

normalizer?

optional normalizer?: NormalizerFn

Custom normalizer replacing the default; cannot be combined with trim or collapseWhitespace.

suggest?

optional suggest?: boolean

Whether to include a suggested better query in error messages.

trim?

optional trim?: boolean

Forwarded to the default normalizer when no custom normalizer is given.

Type Parameters

T

T extends Gtk.Widget = Gtk.Widget

Released under the MPL-2.0 License.