UNPKG

iko-karma-snapshot

Version:

Karma snapshot plugin for iko library

40 lines (39 loc) 988 B
declare global { interface Snapshot { visited?: boolean; dirty?: boolean; lang?: string | null; code: string; } interface SnapshotSuite { visited?: boolean; dirty?: boolean; children: { [key: string]: SnapshotSuite; }; snapshots: { [key: string]: Snapshot[]; }; } interface SnapshotState { update?: boolean; suite: SnapshotSuite; get(path: string[], index: number): Snapshot | undefined; set(path: string[], index: number, code: string, lang?: string): void; match(received: string, expected: string): boolean; } interface MochaContext { test: any; index: number; } interface Window { __mocha_context__: MochaContext; __snapshot__: SnapshotState; } } declare module "iko" { interface Assertion<T> { toMatchSnapshot(update?: boolean): this; } } export {};