UNPKG

@lewiswright/vitest-plugin-vis

Version:
40 lines 1.55 kB
import type { BrowserCommand } from 'vitest/node'; import type { FailureThresholdOptions, ImageSnapshotAnimationOptions, ImageSnapshotTimeoutOptions, PixelComparisonOptions, SsimComparisonOptions } from '../../shared/types.ts'; import type { MatchImageSnapshotOptions } from './match_image_snapshot.ts'; type ImageSnapshotComparisonInfo = { /** * Path to the project root. */ projectRoot: string; /** * Path to the baseline image relative to the project root. */ baselinePath: string; /** * Path to the result image relative to the project root. */ resultPath: string; /** * Path to the diff image relative to the project root. */ diffPath: string; /** * Base64 encoded baseline image. */ baseline: string; /** * Base64 encoded result image. */ result: string; } & ImageSnapshotTimeoutOptions & ImageSnapshotAnimationOptions & FailureThresholdOptions & (SsimComparisonOptions | PixelComparisonOptions); export interface PrepareImageSnapshotComparisonCommand { prepareImageSnapshotComparison: (taskId: string | undefined, subject: string, isAutoSnapshot: boolean, options?: MatchImageSnapshotOptions | undefined) => Promise<ImageSnapshotComparisonInfo | undefined>; } export declare const prepareImageSnapshotComparison: BrowserCommand<[ taskId: string, snapshotId: string, isAutoSnapshot: boolean, options?: MatchImageSnapshotOptions | undefined ]>; export {}; //# sourceMappingURL=prepare_image_snapshot_comparison.d.ts.map