tests.render
Renders tree (<App />) as the screen's only root, with the platform
options describe, and resolves once the app has settled: its requests
answered, its timers due now run and its lists' rows bound.
Verwendung
Observe system display settings.
// Observe system display settings.
import { appearance } from 'kuito';
import { render, test } from 'kuito/tests';
const dark: appearance.AppearancePreferences = { colorScheme: 'dark', fontScale: 1.3 };
test('the header reads in dark mode at a large text size', async () => {
await render(<Header />, { modules: { Appearance: dark } });
});
function Header() {
return null;
}Signaturen
(tree: unknown, options?: RenderOptions): Promise<RenderedApp>Parameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
tree | unknown | Ja | — |
options | RenderOptions | Nein | — Standard: {} |
Rückgabe
Promise<RenderedApp>
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.