tests.replay
Replays a recording a device saved on the headless host, for a golden test that the layout still matches the device's.
Verwendung
Compare a recorded native batch stream with its saved tree.
// Compare a recorded native batch stream with its saved tree.
import { assert, replay, test } from 'kuito/tests';
test('recorded checkout keeps its native tree', async () => {
// Supply a .krec recording and its adjacent .tree file from your app.
const result = await replay('tests/fixtures/checkout.krec');
assert.notEqual(result.recorded, null);
assert.equal(result.tree, result.recorded);
});Signaturen
(file: string, { fonts, screen }?: ReplayOptions): Promise<Replayed>Parameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
file | string | Ja | — |
__1 | ReplayOptions | Nein | — Standard: {} |
Rückgabe
Promise<Replayed>
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.