-
Notifications
You must be signed in to change notification settings - Fork 450
/
jest-types.ts
89 lines (79 loc) · 2.11 KB
/
jest-types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import { TransformOptions as BabelTransformOpts } from 'babel-core';
export interface TransformOptions {
instrument: boolean;
}
export type Path = string;
export type Glob = string;
export interface ConfigGlobals {
[key: string]: any;
}
export interface HasteConfig {
defaultPlatform?: string | null;
hasteImplModulePath?: string;
platforms?: string[];
providesModuleNodeModules: string[];
}
export interface BabelTransformOptions extends BabelTransformOpts {
cacheDirectory?: string;
}
export type PostProcessHook = (
src: string,
filename: string,
config: JestConfig,
transformOptions: TransformOptions,
) => string;
export type JestConfig = Partial<FullJestConfig>;
export interface FullJestConfig {
automock: boolean;
browser: boolean;
cache: boolean;
cacheDirectory: Path;
clearMocks: boolean;
coveragePathIgnorePatterns: string[];
cwd: Path;
detectLeaks: boolean;
displayName: string | null;
forceCoverageMatch: Glob[];
globals: ConfigGlobals;
haste: HasteConfig;
moduleDirectories: string[];
moduleFileExtensions: string[];
moduleLoader: Path;
moduleNameMapper: Array<[string, string]>;
modulePathIgnorePatterns: string[];
modulePaths: string[];
name: string;
resetMocks: boolean;
resetModules: boolean;
resolver: Path | null;
restoreMocks: boolean;
rootDir: Path;
roots: Path[];
runner: string;
setupFiles: Path[];
setupTestFrameworkScriptFile: Path | null;
skipNodeResolution: boolean;
snapshotSerializers: Path[];
testEnvironment: string;
testEnvironmentOptions: object;
testLocationInResults: boolean;
testMatch: Glob[];
testPathIgnorePatterns: string[];
testRegex: string;
testRunner: string;
testURL: string;
timers: 'real' | 'fake';
transform: Array<[string, Path]>;
transformIgnorePatterns: Glob[];
watchPathIgnorePatterns: string[];
unmockedModulePathPatterns: string[] | null;
}
export interface TsJestConfig {
skipBabel?: boolean;
useBabelrc?: boolean;
babelConfig?: BabelTransformOpts;
tsConfigFile?: string;
enableInternalCache?: boolean;
enableTsDiagnostics?: boolean;
disableSourceMapSupport?: boolean;
}