UNPKG

vitest-plugin-vis

Version:
45 lines (44 loc) 1.69 kB
import { n as ComparisonMethod, w as SnapshotMeta } from "./types-CEmjj-A9.mjs"; //#region src/client/task/auto_snapshot_options.d.ts type Suite = { meta: Record<string, any>; suite?: Suite | undefined; }; type MetaTask = { file?: { meta: Record<string, any>; } | undefined; suite?: Suite | undefined; meta: Record<string, any>; } | undefined; /** * Set the snapshot options for auto snapshot. * * You can use it in beforeAll, beforeEach, or individual test cases. * * @param meta - The snapshot options to set. * You can pass a boolean to enable/disable the snapshot, or an object with the snapshot options. * When passing an object, the `enable` property will be set to `true` by default unless you explicitly set it to `false`. * @param meta.enable - Whether to enable the snapshot. * @param meta.snapshotKey - The key to use for the snapshot. * @param meta.comparisonMethod - The comparison method to use for the snapshot. * @param meta.diffOptions - The diff options to use for the snapshot. * @param meta.failureThreshold - The failure threshold to use for the snapshot. * @param meta.failureThresholdType - The failure threshold type to use for the snapshot. * @param meta.timeout - The timeout to use for the snapshot. * * @example * * ```ts * beforeAll(() => setAutoSnapshotOptions(...)) * beforeEach(() => setAutoSnapshotOptions(...)) * * it('...', () => { * setAutoSnapshotOptions(...) * }) * ``` */ declare function setAutoSnapshotOptions<M extends ComparisonMethod>(meta: boolean | SnapshotMeta<M>): void; //#endregion export { setAutoSnapshotOptions as n, MetaTask as t }; //# sourceMappingURL=auto_snapshot_options-BMRtKmod.d.mts.map