UNPKG

@lewiswright/vitest-plugin-vis

Version:
33 lines 1.2 kB
import type { ComparisonMethod, SnapshotMeta } from '../shared/types.ts'; type Suite = { meta: Record<string, any>; suite?: Suite | undefined; }; export type MetaTask = { file?: { meta: Record<string, any>; } | undefined; suite?: Suite | undefined; meta: Record<string, any>; } | undefined; export declare function enableAuto(): void; /** * Set the snapshot options for auto snapshot. * * ```ts * beforeAll((suite) => setAutoSnapshotOptions(suite, ...)) * beforeEach(({ task }) => setAutoSnapshotOptions(task, ...)) * * it('...', ({ task }) => { * setAutoSnapshotOptions(task, ...) * }) * ``` * * @param task Optional. Suite or task to set the options. * If not provided, it will set the options for the current test. */ export declare function setAutoSnapshotOptions<M extends ComparisonMethod>(task: MetaTask, meta: SnapshotMeta<M> | boolean): void; export declare function setAutoSnapshotOptions<M extends ComparisonMethod>(meta: SnapshotMeta<M> | boolean): void; export declare function extractAutoSnapshotOptions<M extends SnapshotMeta<any> = SnapshotMeta<any>>(task: MetaTask): M | undefined; export {}; //# sourceMappingURL=snapshot_options.d.ts.map