function expectOutputAsync()
Waits for output to be rendered (by the test renderer) that matches the provided filters.
function expectOutputAsync(
select: OutputSelectFilter & {
timeout?: number;
},
...nested: OutputSelectFilter[]
): Promise<OutputAssertion>;
Notes
- This function uses TestRenderer.expectOutputAsync(), refer to its documentation for details.
- This function is asynchronous and must be
await-ed.
Parameters
- select — A set of output filters to match, including optional timeout (defaults to 200ms)
- nested — Further output filters to match, if any
Return value
A promise that’s resolved to an OutputAssertion instance for matching output, or rejected when a timeout occurs.
Examples
test("Wait for output", async (t) => {
// ... render output somehow
await expectOutputAsync({ type: "button" });
});
