Skip to content

API Reference / @gtkx/testing / within

Variable: within

const within: <Q>(container, queries?) => BoundQueries & BoundCustomQueries<Q>

Defined in: within.d.ts:12

Binds the built-in queries, and any custom queries, to a specific container so they search only within that scope.

Type Parameters

Q

Q extends QueryMap = Record<never, never>

Parameters

container

Container

The scope the returned queries operate on.

queries?

Q

Optional custom queries to bind alongside the built-in ones.

Returns

BoundQueries & BoundCustomQueries<Q>

The queries bound to the container.

Released under the MPL-2.0 License.