aboutsummaryrefslogtreecommitdiffstats
path: root/vanilla/node_modules/@vitest/snapshot/dist/environment.d-DHdQ1Csl.d.ts
blob: 435ae4fc068762bc253567800c37cc1bbb8dad28 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
interface ParsedStack {
	method: string;
	file: string;
	line: number;
	column: number;
}

interface SnapshotEnvironment {
	getVersion: () => string;
	getHeader: () => string;
	resolvePath: (filepath: string) => Promise<string>;
	resolveRawPath: (testPath: string, rawPath: string) => Promise<string>;
	saveSnapshotFile: (filepath: string, snapshot: string) => Promise<void>;
	readSnapshotFile: (filepath: string) => Promise<string | null>;
	removeSnapshotFile: (filepath: string) => Promise<void>;
	processStackTrace?: (stack: ParsedStack) => ParsedStack;
}
interface SnapshotEnvironmentOptions {
	snapshotsDirName?: string;
}

export type { ParsedStack as P, SnapshotEnvironment as S, SnapshotEnvironmentOptions as a };