projen 0.52.21 → 0.52.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +139 -107
- package/changelog.md +3 -3
- package/docs/api/API.md +42 -39
- package/lib/awscdk/auto-discover.d.ts +14 -46
- package/lib/awscdk/auto-discover.js +8 -22
- package/lib/awscdk/awscdk-app-java.d.ts +10 -32
- package/lib/awscdk/awscdk-app-java.js +5 -9
- package/lib/awscdk/awscdk-app-ts.d.ts +15 -35
- package/lib/awscdk/awscdk-app-ts.js +6 -14
- package/lib/awscdk/awscdk-construct.d.ts +14 -28
- package/lib/awscdk/awscdk-construct.js +8 -16
- package/lib/awscdk/awscdk-deps-java.d.ts +1 -8
- package/lib/awscdk/awscdk-deps-java.js +3 -10
- package/lib/awscdk/awscdk-deps-js.d.ts +1 -8
- package/lib/awscdk/awscdk-deps-js.js +3 -10
- package/lib/awscdk/awscdk-deps.d.ts +28 -67
- package/lib/awscdk/awscdk-deps.js +5 -12
- package/lib/awscdk/cdk-config.d.ts +19 -51
- package/lib/awscdk/cdk-config.js +13 -11
- package/lib/awscdk/cdk-tasks.d.ts +7 -24
- package/lib/awscdk/cdk-tasks.js +3 -8
- package/lib/awscdk/integration-test.d.ts +7 -29
- package/lib/awscdk/integration-test.js +3 -8
- package/lib/awscdk/lambda-function.d.ts +22 -50
- package/lib/awscdk/lambda-function.js +11 -24
- package/lib/build/build-workflow.d.ts +33 -78
- package/lib/build/build-workflow.js +15 -25
- package/lib/cdk/auto-discover-base.d.ts +11 -34
- package/lib/cdk/auto-discover-base.js +5 -15
- package/lib/cdk/construct-lib.d.ts +8 -22
- package/lib/cdk/construct-lib.js +3 -8
- package/lib/cdk/integration-test-base.d.ts +12 -38
- package/lib/cdk/integration-test-base.js +2 -8
- package/lib/cdk/jsii-docgen.d.ts +6 -12
- package/lib/cdk/jsii-docgen.js +6 -8
- package/lib/cdk/jsii-project.d.ts +16 -95
- package/lib/cdk/jsii-project.js +3 -10
- package/lib/cdk8s/auto-discover.d.ts +6 -23
- package/lib/cdk8s/auto-discover.js +6 -15
- package/lib/cdk8s/cdk8s-app-ts.d.ts +21 -43
- package/lib/cdk8s/cdk8s-app-ts.js +4 -7
- package/lib/cdk8s/cdk8s-construct.d.ts +12 -27
- package/lib/cdk8s/cdk8s-construct.js +3 -7
- package/lib/cdk8s/integration-test.d.ts +2 -9
- package/lib/cdk8s/integration-test.js +3 -8
- package/lib/cdktf/cdktf-construct.d.ts +3 -12
- package/lib/cdktf/cdktf-construct.js +3 -7
- package/lib/component.d.ts +4 -17
- package/lib/component.js +6 -19
- package/lib/dependencies.d.ts +44 -77
- package/lib/dependencies.js +50 -38
- package/lib/dev-env.d.ts +26 -53
- package/lib/dev-env.js +9 -19
- package/lib/docker-compose.d.ts +83 -209
- package/lib/docker-compose.js +38 -61
- package/lib/file.d.ts +24 -71
- package/lib/file.js +4 -16
- package/lib/gitattributes.d.ts +3 -14
- package/lib/gitattributes.js +5 -16
- package/lib/github/auto-approve.d.ts +7 -23
- package/lib/github/auto-approve.js +3 -8
- package/lib/github/auto-merge.d.ts +7 -29
- package/lib/github/auto-merge.js +7 -16
- package/lib/github/dependabot.d.ts +54 -147
- package/lib/github/dependabot.js +81 -22
- package/lib/github/github-project.d.ts +26 -70
- package/lib/github/github-project.js +5 -10
- package/lib/github/github.d.ts +19 -58
- package/lib/github/github.js +9 -30
- package/lib/github/mergify.d.ts +9 -54
- package/lib/github/mergify.js +2 -14
- package/lib/github/pr-template.d.ts +3 -13
- package/lib/github/pr-template.js +3 -8
- package/lib/github/pull-request-lint.d.ts +8 -28
- package/lib/github/pull-request-lint.js +3 -9
- package/lib/github/stale.d.ts +17 -47
- package/lib/github/stale.js +6 -10
- package/lib/github/task-workflow.d.ts +21 -63
- package/lib/github/task-workflow.js +3 -8
- package/lib/github/workflows-model.d.ts +199 -582
- package/lib/github/workflows-model.js +5 -4
- package/lib/github/workflows.d.ts +14 -41
- package/lib/github/workflows.js +8 -16
- package/lib/gitlab/configuration-model.d.ts +145 -947
- package/lib/gitlab/configuration-model.js +11 -28
- package/lib/gitlab/configuration.d.ts +31 -121
- package/lib/gitlab/configuration.js +14 -49
- package/lib/gitlab/gitlab-configuration.d.ts +2 -13
- package/lib/gitlab/gitlab-configuration.js +4 -15
- package/lib/gitlab/nested-configuration.d.ts +1 -9
- package/lib/gitlab/nested-configuration.js +3 -8
- package/lib/gitpod.d.ts +71 -167
- package/lib/gitpod.js +75 -42
- package/lib/ignore-file.d.ts +4 -23
- package/lib/ignore-file.js +6 -25
- package/lib/ini.d.ts +2 -14
- package/lib/ini.js +3 -13
- package/lib/java/java-project.d.ts +29 -70
- package/lib/java/java-project.js +10 -17
- package/lib/java/junit.d.ts +5 -17
- package/lib/java/junit.js +3 -8
- package/lib/java/maven-compile.d.ts +4 -13
- package/lib/java/maven-compile.js +3 -8
- package/lib/java/maven-packaging.d.ts +6 -21
- package/lib/java/maven-packaging.js +3 -8
- package/lib/java/maven-sample.d.ts +2 -12
- package/lib/java/maven-sample.js +3 -8
- package/lib/java/pom.d.ts +38 -100
- package/lib/java/pom.js +13 -25
- package/lib/java/projenrc.d.ts +7 -22
- package/lib/java/projenrc.js +3 -8
- package/lib/javascript/bundler.d.ts +30 -72
- package/lib/javascript/bundler.js +13 -21
- package/lib/javascript/eslint.d.ts +27 -84
- package/lib/javascript/eslint.js +11 -30
- package/lib/javascript/jest.d.ts +91 -344
- package/lib/javascript/jest.js +6 -23
- package/lib/javascript/node-package.d.ts +111 -259
- package/lib/javascript/node-package.js +64 -81
- package/lib/javascript/node-project.d.ts +112 -220
- package/lib/javascript/node-project.js +54 -73
- package/lib/javascript/npm-config.d.ts +9 -19
- package/lib/javascript/npm-config.js +9 -16
- package/lib/javascript/prettier.d.ts +65 -196
- package/lib/javascript/prettier.js +70 -46
- package/lib/javascript/projenrc.d.ts +2 -12
- package/lib/javascript/projenrc.js +3 -8
- package/lib/javascript/typescript-config.d.ts +62 -158
- package/lib/javascript/typescript-config.js +31 -18
- package/lib/javascript/upgrade-dependencies.d.ts +35 -94
- package/lib/javascript/upgrade-dependencies.js +21 -51
- package/lib/json.d.ts +3 -17
- package/lib/json.js +3 -13
- package/lib/license.d.ts +3 -20
- package/lib/license.js +2 -13
- package/lib/logger.d.ts +18 -62
- package/lib/logger.js +17 -37
- package/lib/makefile.d.ts +14 -45
- package/lib/makefile.js +7 -25
- package/lib/object-file.d.ts +19 -39
- package/lib/object-file.js +17 -28
- package/lib/option-hints.d.ts +4 -13
- package/lib/option-hints.js +11 -5
- package/lib/project-build.d.ts +7 -26
- package/lib/project-build.js +3 -8
- package/lib/project.d.ts +64 -186
- package/lib/project.js +43 -91
- package/lib/projects.d.ts +11 -32
- package/lib/projects.js +4 -8
- package/lib/projenrc-json.d.ts +2 -12
- package/lib/projenrc-json.js +3 -8
- package/lib/python/pip.d.ts +7 -23
- package/lib/python/pip.js +8 -17
- package/lib/python/poetry.d.ts +36 -121
- package/lib/python/poetry.js +12 -26
- package/lib/python/projenrc.d.ts +4 -15
- package/lib/python/projenrc.js +3 -8
- package/lib/python/pytest.d.ts +3 -16
- package/lib/python/pytest.js +2 -8
- package/lib/python/python-deps.d.ts +7 -21
- package/lib/python/python-deps.js +1 -1
- package/lib/python/python-env.d.ts +1 -6
- package/lib/python/python-env.js +1 -1
- package/lib/python/python-packaging.d.ts +12 -34
- package/lib/python/python-packaging.js +1 -1
- package/lib/python/python-project.d.ts +34 -79
- package/lib/python/python-project.js +7 -20
- package/lib/python/python-sample.d.ts +2 -9
- package/lib/python/python-sample.js +3 -8
- package/lib/python/requirements-file.d.ts +4 -19
- package/lib/python/requirements-file.js +5 -15
- package/lib/python/setuppy.d.ts +11 -39
- package/lib/python/setuppy.js +3 -13
- package/lib/python/setuptools.d.ts +2 -14
- package/lib/python/setuptools.js +3 -8
- package/lib/python/venv.d.ts +4 -14
- package/lib/python/venv.js +4 -11
- package/lib/readme.d.ts +7 -16
- package/lib/readme.js +5 -7
- package/lib/release/publisher.d.ts +103 -206
- package/lib/release/publisher.js +47 -59
- package/lib/release/release-trigger.d.ts +16 -48
- package/lib/release/release-trigger.js +8 -18
- package/lib/release/release.d.ts +50 -110
- package/lib/release/release.js +9 -24
- package/lib/run-task.js +1820 -0
- package/lib/sample-file.d.ts +14 -47
- package/lib/sample-file.js +9 -30
- package/lib/semver.d.ts +4 -21
- package/lib/semver.js +6 -20
- package/lib/source-code.d.ts +7 -23
- package/lib/source-code.js +7 -19
- package/lib/task-model.d.ts +21 -61
- package/lib/task-model.js +1 -1
- package/lib/task-runtime.d.ts +7 -24
- package/lib/task-runtime.js +7 -20
- package/lib/task.d.ts +29 -73
- package/lib/task.js +28 -61
- package/lib/tasks.d.ts +12 -34
- package/lib/tasks.js +14 -36
- package/lib/testing.d.ts +6 -10
- package/lib/testing.js +8 -12
- package/lib/textfile.d.ts +9 -24
- package/lib/textfile.js +9 -19
- package/lib/toml.d.ts +2 -14
- package/lib/toml.js +3 -13
- package/lib/typescript/projenrc.d.ts +4 -14
- package/lib/typescript/projenrc.js +3 -8
- package/lib/typescript/typescript-typedoc.d.ts +1 -6
- package/lib/typescript/typescript-typedoc.js +3 -8
- package/lib/typescript/typescript.d.ts +24 -82
- package/lib/typescript/typescript.js +6 -15
- package/lib/version.d.ts +9 -38
- package/lib/version.js +2 -11
- package/lib/vscode/devcontainer.d.ts +10 -30
- package/lib/vscode/devcontainer.js +10 -26
- package/lib/vscode/launch-config.d.ts +18 -97
- package/lib/vscode/launch-config.js +9 -15
- package/lib/vscode/vscode.d.ts +0 -9
- package/lib/vscode/vscode.js +2 -11
- package/lib/web/next.d.ts +19 -60
- package/lib/web/next.js +6 -20
- package/lib/web/postcss.d.ts +3 -24
- package/lib/web/postcss.js +3 -8
- package/lib/web/react.d.ts +13 -60
- package/lib/web/react.js +7 -32
- package/lib/web/tailwind.d.ts +1 -15
- package/lib/web/tailwind.js +3 -7
- package/lib/xmlfile.d.ts +2 -14
- package/lib/xmlfile.js +3 -13
- package/lib/yaml.d.ts +4 -19
- package/lib/yaml.js +3 -13
- package/package.json +5 -5
- package/releasetag.txt +1 -1
- package/version.txt +1 -1
package/lib/javascript/jest.d.ts
CHANGED
|
@@ -1,582 +1,394 @@
|
|
|
1
1
|
import { NodeProject } from "../javascript";
|
|
2
|
-
/**
|
|
3
|
-
* @experimental
|
|
4
|
-
*/
|
|
5
2
|
export interface JestConfigOptions {
|
|
6
3
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* This option tells Jest that all imported modules in your tests should be mocked automatically.
|
|
9
5
|
* All modules used in your tests will have a replacement implementation, keeping the API surface
|
|
10
|
-
*
|
|
11
6
|
* @default - false
|
|
12
|
-
* @experimental
|
|
13
7
|
*/
|
|
14
8
|
readonly automock?: boolean;
|
|
15
9
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
10
|
+
* By default, Jest runs all tests and produces all errors into the console upon completion.
|
|
18
11
|
* The bail config option can be used here to have Jest stop running tests after n failures.
|
|
19
12
|
* Setting bail to true is the same as setting bail to 1.
|
|
20
|
-
*
|
|
21
13
|
* @default - 0
|
|
22
|
-
* @experimental
|
|
23
14
|
*/
|
|
24
15
|
readonly bail?: boolean | number;
|
|
25
16
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
17
|
+
* The directory where Jest should store its cached dependency information
|
|
28
18
|
* @default - "/tmp/<path>"
|
|
29
|
-
* @experimental
|
|
30
19
|
*/
|
|
31
20
|
readonly cacheDirectory?: string;
|
|
32
21
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
22
|
+
* Automatically clear mock calls and instances before every test.
|
|
35
23
|
* Equivalent to calling jest.clearAllMocks() before each test.
|
|
36
24
|
* This does not remove any mock implementation that may have been provided
|
|
37
|
-
*
|
|
38
25
|
* @default true
|
|
39
|
-
* @experimental
|
|
40
26
|
*/
|
|
41
27
|
readonly clearMocks?: boolean;
|
|
42
28
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
29
|
+
* Indicates whether the coverage information should be collected while executing the test.
|
|
45
30
|
* Because this retrofits all executed files with coverage collection statements,
|
|
46
31
|
* it may significantly slow down your tests
|
|
47
|
-
*
|
|
48
32
|
* @default true
|
|
49
|
-
* @experimental
|
|
50
33
|
*/
|
|
51
34
|
readonly collectCoverage?: boolean;
|
|
52
35
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
36
|
+
* An array of glob patterns indicating a set of files for which coverage information should be collected.
|
|
55
37
|
* @default - undefined
|
|
56
|
-
* @experimental
|
|
57
38
|
*/
|
|
58
39
|
readonly collectCoverageFrom?: string[];
|
|
59
40
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
41
|
+
* The directory where Jest should output its coverage files.
|
|
62
42
|
* @default "coverage"
|
|
63
|
-
* @experimental
|
|
64
43
|
*/
|
|
65
44
|
readonly coverageDirectory?: string;
|
|
66
45
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
46
|
+
* An array of regexp pattern strings that are matched against all file paths before executing the test.
|
|
69
47
|
* If the file path matches any of the patterns, coverage information will be skipped
|
|
70
|
-
*
|
|
71
48
|
* @default "/node_modules/"
|
|
72
|
-
* @experimental
|
|
73
49
|
*/
|
|
74
50
|
readonly coveragePathIgnorePatterns?: string[];
|
|
75
51
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
52
|
+
* Indicates which provider should be used to instrument code for coverage.
|
|
78
53
|
* Allowed values are babel (default) or v8
|
|
79
|
-
*
|
|
80
54
|
* @default - "babel"
|
|
81
|
-
* @experimental
|
|
82
55
|
*/
|
|
83
56
|
readonly coverageProvider?: "babel" | "v8";
|
|
84
57
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* Any istanbul reporter can be used
|
|
88
|
-
*
|
|
58
|
+
* A list of reporter names that Jest uses when writing coverage reports. Any istanbul reporter can be used
|
|
89
59
|
* @default - ["json", "lcov", "text", "clover", "cobertura"]
|
|
90
|
-
* @experimental
|
|
91
60
|
*/
|
|
92
61
|
readonly coverageReporters?: string[];
|
|
93
62
|
/**
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* This will be used to configure minimum threshold enforcement
|
|
63
|
+
* Specify the global coverage thresholds. This will be used to configure minimum threshold enforcement
|
|
97
64
|
* for coverage results. Thresholds can be specified as global, as a glob, and as a directory or file path.
|
|
98
65
|
* If thresholds aren't met, jest will fail.
|
|
99
|
-
*
|
|
100
66
|
* @default - undefined
|
|
101
|
-
* @experimental
|
|
102
67
|
*/
|
|
103
68
|
readonly coverageThreshold?: CoverageThreshold;
|
|
104
69
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
70
|
+
* This option allows the use of a custom dependency extractor.
|
|
107
71
|
* It must be a node module that exports an object with an extract function
|
|
108
|
-
*
|
|
109
72
|
* @default - undefined
|
|
110
|
-
* @experimental
|
|
111
73
|
*/
|
|
112
74
|
readonly dependencyExtractor?: string;
|
|
113
75
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
76
|
+
* Allows for a label to be printed alongside a test while it is running.
|
|
116
77
|
* @default - undefined
|
|
117
|
-
* @experimental
|
|
118
78
|
*/
|
|
119
79
|
readonly displayName?: string | any;
|
|
120
80
|
/**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* Useful for easing the upgrade process.
|
|
124
|
-
*
|
|
81
|
+
* Make calling deprecated APIs throw helpful error messages. Useful for easing the upgrade process.
|
|
125
82
|
* @default - false
|
|
126
|
-
* @experimental
|
|
127
83
|
*/
|
|
128
84
|
readonly errorOnDeprecated?: boolean;
|
|
129
85
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
86
|
+
* Test files run inside a vm, which slows calls to global context properties (e.g. Math).
|
|
87
|
+
* With this option you can specify extra properties to be defined inside the vm for faster lookups.
|
|
132
88
|
* @default - undefined
|
|
133
|
-
* @experimental
|
|
134
89
|
*/
|
|
135
90
|
readonly extraGlobals?: string[];
|
|
136
91
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
92
|
+
* Test files are normally ignored from collecting code coverage.
|
|
139
93
|
* With this option, you can overwrite this behavior and include otherwise ignored files in code coverage.
|
|
140
|
-
*
|
|
141
94
|
* @default - ['']
|
|
142
|
-
* @experimental
|
|
143
95
|
*/
|
|
144
96
|
readonly forceCoverageMatch?: string[];
|
|
145
97
|
/**
|
|
146
|
-
*
|
|
147
|
-
*
|
|
98
|
+
* A set of global variables that need to be available in all test environments.
|
|
148
99
|
* @default - {}
|
|
149
|
-
* @experimental
|
|
150
100
|
*/
|
|
151
101
|
readonly globals?: any;
|
|
152
102
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
* This function gets Jest's globalConfig object as a parameter.
|
|
156
|
-
*
|
|
103
|
+
* This option allows the use of a custom global setup module which exports an async function that is
|
|
104
|
+
* triggered once before all test suites. This function gets Jest's globalConfig object as a parameter.
|
|
157
105
|
* @default - undefined
|
|
158
|
-
* @experimental
|
|
159
106
|
*/
|
|
160
107
|
readonly globalSetup?: string;
|
|
161
108
|
/**
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
* This function gets Jest's globalConfig object as a parameter.
|
|
165
|
-
*
|
|
109
|
+
* This option allows the use of a custom global teardown module which exports an async function that is
|
|
110
|
+
* triggered once after all test suites. This function gets Jest's globalConfig object as a parameter.
|
|
166
111
|
* @default - undefined
|
|
167
|
-
* @experimental
|
|
168
112
|
*/
|
|
169
113
|
readonly globalTeardown?: string;
|
|
170
114
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
115
|
+
* This will be used to configure the behavior of jest-haste-map, Jest's internal file crawler/cache system.
|
|
173
116
|
* @default - {}
|
|
174
|
-
* @experimental
|
|
175
117
|
*/
|
|
176
118
|
readonly haste?: HasteConfig;
|
|
177
119
|
/**
|
|
178
|
-
*
|
|
179
|
-
*
|
|
120
|
+
* Insert Jest's globals (expect, test, describe, beforeEach etc.) into the global environment.
|
|
121
|
+
* If you set this to false, you should import from @jest/globals
|
|
180
122
|
* @default - true
|
|
181
|
-
* @experimental
|
|
182
123
|
*/
|
|
183
124
|
readonly injectGlobals?: boolean;
|
|
184
125
|
/**
|
|
185
|
-
*
|
|
186
|
-
*
|
|
126
|
+
* A number limiting the number of tests that are allowed to run at the same time when using test.concurrent.
|
|
127
|
+
* Any test above this limit will be queued and executed once a slot is released.
|
|
187
128
|
* @default - 5
|
|
188
|
-
* @experimental
|
|
189
129
|
*/
|
|
190
130
|
readonly maxConcurrency?: number;
|
|
191
131
|
/**
|
|
192
|
-
*
|
|
193
|
-
*
|
|
132
|
+
* An array of directory names to be searched recursively up from the requiring module's location.
|
|
194
133
|
* Setting this option will override the default, if you wish to still search node_modules for packages
|
|
195
134
|
* include it along with any other options: ["node_modules", "bower_components"]
|
|
196
|
-
*
|
|
197
135
|
* @default - ["node_modules"]
|
|
198
|
-
* @experimental
|
|
199
136
|
*/
|
|
200
137
|
readonly moduleDirectories?: string[];
|
|
201
138
|
/**
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
* If you require modules without specifying a file extension,
|
|
139
|
+
* An array of file extensions your modules use. If you require modules without specifying a file extension,
|
|
205
140
|
* these are the extensions Jest will look for, in left-to-right order.
|
|
206
|
-
*
|
|
207
141
|
* @default - ["js", "json", "jsx", "ts", "tsx", "node"]
|
|
208
|
-
* @experimental
|
|
209
142
|
*/
|
|
210
143
|
readonly moduleFileExtensions?: string[];
|
|
211
144
|
/**
|
|
212
|
-
*
|
|
213
|
-
*
|
|
145
|
+
* A map from regular expressions to module names or to arrays of module names that allow to stub out
|
|
146
|
+
* resources, like images or styles with a single module.
|
|
214
147
|
* @default - null
|
|
215
|
-
* @experimental
|
|
216
148
|
*/
|
|
217
149
|
readonly moduleNameMapper?: {
|
|
218
150
|
[key: string]: string | string[];
|
|
219
151
|
};
|
|
220
152
|
/**
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
* If a given module's path matches any of the patterns,
|
|
153
|
+
* An array of regexp pattern strings that are matched against all module paths before those paths are
|
|
154
|
+
* to be considered 'visible' to the module loader. If a given module's path matches any of the patterns,
|
|
224
155
|
* it will not be require()-able in the test environment.
|
|
225
|
-
*
|
|
226
156
|
* @default - []
|
|
227
|
-
* @experimental
|
|
228
157
|
*/
|
|
229
158
|
readonly modulePathIgnorePatterns?: string[];
|
|
230
159
|
/**
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
* Use the <rootDir> string token to include
|
|
160
|
+
* An alternative API to setting the NODE_PATH env variable, modulePaths is an array of absolute paths
|
|
161
|
+
* to additional locations to search when resolving modules. Use the <rootDir> string token to include
|
|
234
162
|
* the path to your project's root directory. Example: ["<rootDir>/app/"].
|
|
235
|
-
*
|
|
236
163
|
* @default - []
|
|
237
|
-
* @experimental
|
|
238
164
|
*/
|
|
239
165
|
readonly modulePaths?: string[];
|
|
240
166
|
/**
|
|
241
|
-
*
|
|
242
|
-
*
|
|
167
|
+
* Activates notifications for test results.
|
|
243
168
|
* @default - false
|
|
244
|
-
* @experimental
|
|
245
169
|
*/
|
|
246
170
|
readonly notify?: boolean;
|
|
247
171
|
/**
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
* Requires notify: true
|
|
251
|
-
*
|
|
172
|
+
* Specifies notification mode. Requires notify: true
|
|
252
173
|
* @default - failure-change
|
|
253
|
-
* @experimental
|
|
254
174
|
*/
|
|
255
175
|
readonly notifyMode?: "always" | "failure" | "success" | "change" | "success-change" | "failure-change";
|
|
256
176
|
/**
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
* A preset should point to an npm module
|
|
177
|
+
* A preset that is used as a base for Jest's configuration. A preset should point to an npm module
|
|
260
178
|
* that has a jest-preset.json or jest-preset.js file at the root.
|
|
261
|
-
*
|
|
262
179
|
* @default - undefined
|
|
263
|
-
* @experimental
|
|
264
180
|
*/
|
|
265
181
|
readonly preset?: string;
|
|
266
182
|
/**
|
|
267
|
-
*
|
|
268
|
-
*
|
|
183
|
+
* Sets the path to the prettier node module used to update inline snapshots.
|
|
269
184
|
* @default - "prettier"
|
|
270
|
-
* @experimental
|
|
271
185
|
*/
|
|
272
186
|
readonly prettierPath?: string;
|
|
273
187
|
/**
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
* This is great for monorepos or
|
|
188
|
+
* When the projects configuration is provided with an array of paths or glob patterns, Jest will
|
|
189
|
+
* run tests in all of the specified projects at the same time. This is great for monorepos or
|
|
277
190
|
* when working on multiple projects at the same time.
|
|
278
|
-
*
|
|
279
191
|
* @default - undefined
|
|
280
|
-
* @experimental
|
|
281
192
|
*/
|
|
282
193
|
readonly projects?: Array<string | {
|
|
283
194
|
[key: string]: any;
|
|
284
195
|
}>;
|
|
285
196
|
/**
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
* A custom reporter is a class
|
|
197
|
+
* Use this configuration option to add custom reporters to Jest. A custom reporter is a class
|
|
289
198
|
* that implements onRunStart, onTestStart, onTestResult, onRunComplete methods that will be
|
|
290
199
|
* called when any of those events occurs.
|
|
291
|
-
*
|
|
292
200
|
* @default - undefined
|
|
293
|
-
* @experimental
|
|
294
201
|
*/
|
|
295
202
|
readonly reporters?: JestReporter[];
|
|
296
203
|
/**
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
* Equivalent to calling jest.resetAllMocks()
|
|
204
|
+
* Automatically reset mock state before every test. Equivalent to calling jest.resetAllMocks()
|
|
300
205
|
* before each test. This will lead to any mocks having their fake implementations removed but
|
|
301
206
|
* does not restore their initial implementation.
|
|
302
|
-
*
|
|
303
207
|
* @default - false
|
|
304
|
-
* @experimental
|
|
305
208
|
*/
|
|
306
209
|
readonly resetMocks?: boolean;
|
|
307
210
|
/**
|
|
308
|
-
*
|
|
309
|
-
*
|
|
310
|
-
* Enabling resetModules
|
|
211
|
+
* By default, each test file gets its own independent module registry. Enabling resetModules
|
|
311
212
|
* goes a step further and resets the module registry before running each individual test.
|
|
312
|
-
*
|
|
313
213
|
* @default - false
|
|
314
|
-
* @experimental
|
|
315
214
|
*/
|
|
316
215
|
readonly resetModules?: boolean;
|
|
317
216
|
/**
|
|
318
|
-
*
|
|
319
|
-
*
|
|
217
|
+
* This option allows the use of a custom resolver.
|
|
320
218
|
* https://jestjs.io/docs/en/configuration#resolver-string
|
|
321
|
-
*
|
|
322
219
|
* @default - undefined
|
|
323
|
-
* @experimental
|
|
324
220
|
*/
|
|
325
221
|
readonly resolver?: string;
|
|
326
222
|
/**
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
* Equivalent to calling jest.restoreAllMocks()
|
|
223
|
+
* Automatically restore mock state before every test. Equivalent to calling jest.restoreAllMocks()
|
|
330
224
|
* before each test. This will lead to any mocks having their fake implementations removed and
|
|
331
225
|
* restores their initial implementation.
|
|
332
|
-
*
|
|
333
226
|
* @default - false
|
|
334
|
-
* @experimental
|
|
335
227
|
*/
|
|
336
228
|
readonly restoreMocks?: boolean;
|
|
337
229
|
/**
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
* If you put your Jest
|
|
230
|
+
* The root directory that Jest should scan for tests and modules within. If you put your Jest
|
|
341
231
|
* config inside your package.json and want the root directory to be the root of your repo, the
|
|
342
232
|
* value for this config param will default to the directory of the package.json.
|
|
343
|
-
*
|
|
344
233
|
* @default - directory of the package.json
|
|
345
|
-
* @experimental
|
|
346
234
|
*/
|
|
347
235
|
readonly rootDir?: string;
|
|
348
236
|
/**
|
|
349
|
-
*
|
|
350
|
-
*
|
|
237
|
+
* A list of paths to directories that Jest should use to search for files in.
|
|
351
238
|
* @default - ["<rootDir>"]
|
|
352
|
-
* @experimental
|
|
353
239
|
*/
|
|
354
240
|
readonly roots?: string[];
|
|
355
241
|
/**
|
|
356
|
-
*
|
|
357
|
-
*
|
|
242
|
+
* This option allows you to use a custom runner instead of Jest's default test runner.
|
|
358
243
|
* @default - "jest-runner"
|
|
359
|
-
* @experimental
|
|
360
244
|
*/
|
|
361
245
|
readonly runner?: string;
|
|
362
246
|
/**
|
|
363
|
-
*
|
|
364
|
-
*
|
|
247
|
+
* A list of paths to modules that run some code to configure or set up the testing environment.
|
|
365
248
|
* Each setupFile will be run once per test file. Since every test runs in its own environment,
|
|
366
249
|
* these scripts will be executed in the testing environment immediately before executing the
|
|
367
250
|
* test code itself.
|
|
368
|
-
*
|
|
369
251
|
* @default - []
|
|
370
|
-
* @experimental
|
|
371
252
|
*/
|
|
372
253
|
readonly setupFiles?: string[];
|
|
373
254
|
/**
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
* Since setupFiles executes before the test
|
|
255
|
+
* A list of paths to modules that run some code to configure or set up the testing framework
|
|
256
|
+
* before each test file in the suite is executed. Since setupFiles executes before the test
|
|
377
257
|
* framework is installed in the environment, this script file presents you the opportunity of
|
|
378
258
|
* running some code immediately after the test framework has been installed in the environment.
|
|
379
|
-
*
|
|
380
259
|
* @default - []
|
|
381
|
-
* @experimental
|
|
382
260
|
*/
|
|
383
261
|
readonly setupFilesAfterEnv?: string[];
|
|
384
262
|
/**
|
|
385
|
-
*
|
|
386
|
-
*
|
|
263
|
+
* The number of seconds after which a test is considered as slow and reported as such in the results.
|
|
387
264
|
* @default - 5
|
|
388
|
-
* @experimental
|
|
389
265
|
*/
|
|
390
266
|
readonly slowTestThreshold?: number;
|
|
391
267
|
/**
|
|
392
|
-
*
|
|
393
|
-
*
|
|
394
|
-
* This config option lets you customize
|
|
268
|
+
* The path to a module that can resolve test<->snapshot path. This config option lets you customize
|
|
395
269
|
* where Jest stores snapshot files on disk.
|
|
396
|
-
*
|
|
397
270
|
* @default - undefined
|
|
398
|
-
* @experimental
|
|
399
271
|
*/
|
|
400
272
|
readonly snapshotResolver?: string;
|
|
401
273
|
/**
|
|
402
|
-
*
|
|
403
|
-
*
|
|
274
|
+
* A list of paths to snapshot serializer modules Jest should use for snapshot testing.
|
|
404
275
|
* @default = []
|
|
405
|
-
* @experimental
|
|
406
276
|
*/
|
|
407
277
|
readonly snapshotSerializers?: string[];
|
|
408
278
|
/**
|
|
409
|
-
*
|
|
410
|
-
*
|
|
411
|
-
* The default environment in Jest is a
|
|
279
|
+
* The test environment that will be used for testing. The default environment in Jest is a
|
|
412
280
|
* browser-like environment through jsdom. If you are building a node service, you can use the node
|
|
413
281
|
* option to use a node-like environment instead.
|
|
414
|
-
*
|
|
415
282
|
* @default - "jsdom"
|
|
416
|
-
* @experimental
|
|
417
283
|
*/
|
|
418
284
|
readonly testEnvironment?: string;
|
|
419
285
|
/**
|
|
420
|
-
*
|
|
421
|
-
*
|
|
286
|
+
* Test environment options that will be passed to the testEnvironment.
|
|
422
287
|
* The relevant options depend on the environment.
|
|
423
|
-
*
|
|
424
288
|
* @default - {}
|
|
425
|
-
* @experimental
|
|
426
289
|
*/
|
|
427
290
|
readonly testEnvironmentOptions?: any;
|
|
428
291
|
/**
|
|
429
|
-
*
|
|
430
|
-
*
|
|
292
|
+
* The exit code Jest returns on test failure.
|
|
431
293
|
* @default - 1
|
|
432
|
-
* @experimental
|
|
433
294
|
*/
|
|
434
295
|
readonly testFailureExitCode?: number;
|
|
435
296
|
/**
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
* By default it looks for .js, .jsx, .ts and .tsx
|
|
297
|
+
* The glob patterns Jest uses to detect test files. By default it looks for .js, .jsx, .ts and .tsx
|
|
439
298
|
* files inside of __tests__ folders, as well as any files with a suffix of .test or .spec
|
|
440
299
|
* (e.g. Component.test.js or Component.spec.js). It will also find files called test.js or spec.js.
|
|
441
|
-
*
|
|
442
300
|
* @default ['**\/__tests__/**\/*.[jt]s?(x)', '**\/?(*.)+(spec|test).[tj]s?(x)']
|
|
443
|
-
* @experimental
|
|
444
301
|
*/
|
|
445
302
|
readonly testMatch?: string[];
|
|
446
303
|
/**
|
|
447
|
-
*
|
|
448
|
-
*
|
|
304
|
+
* An array of regexp pattern strings that are matched against all test paths before executing the test.
|
|
449
305
|
* If the test path matches any of the patterns, it will be skipped.
|
|
450
|
-
*
|
|
451
306
|
* @default - ["/node_modules/"]
|
|
452
|
-
* @experimental
|
|
453
307
|
*/
|
|
454
308
|
readonly testPathIgnorePatterns?: string[];
|
|
455
309
|
/**
|
|
456
|
-
*
|
|
457
|
-
*
|
|
458
|
-
* By default it looks for .js, .jsx, .ts and .tsx
|
|
310
|
+
* The pattern or patterns Jest uses to detect test files. By default it looks for .js, .jsx, .ts and .tsx
|
|
459
311
|
* files inside of __tests__ folders, as well as any files with a suffix of .test or .spec
|
|
460
312
|
* (e.g. Component.test.js or Component.spec.js). It will also find files called test.js or spec.js.
|
|
461
|
-
*
|
|
462
313
|
* @default - (/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$
|
|
463
|
-
* @experimental
|
|
464
314
|
*/
|
|
465
315
|
readonly testRegex?: string | string[];
|
|
466
316
|
/**
|
|
467
|
-
*
|
|
468
|
-
*
|
|
317
|
+
* This option allows the use of a custom results processor.
|
|
469
318
|
* @default - undefined
|
|
470
|
-
* @experimental
|
|
471
319
|
*/
|
|
472
320
|
readonly testResultsProcessor?: string;
|
|
473
321
|
/**
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
* The default is jasmine2. A custom test runner
|
|
322
|
+
* This option allows the use of a custom test runner. The default is jasmine2. A custom test runner
|
|
477
323
|
* can be provided by specifying a path to a test runner implementation.
|
|
478
|
-
*
|
|
479
324
|
* @default - "jasmine2"
|
|
480
|
-
* @experimental
|
|
481
325
|
*/
|
|
482
326
|
readonly testRunner?: string;
|
|
483
327
|
/**
|
|
484
|
-
*
|
|
485
|
-
*
|
|
328
|
+
* This option allows you to use a custom sequencer instead of Jest's default.
|
|
486
329
|
* Sort may optionally return a Promise.
|
|
487
|
-
*
|
|
488
|
-
* @default - "
|
|
489
|
-
* @experimental
|
|
490
|
-
* @jest /test-sequencer"
|
|
330
|
+
* @default - "@jest/test-sequencer"
|
|
491
331
|
*/
|
|
492
332
|
readonly testSequencer?: string;
|
|
493
333
|
/**
|
|
494
|
-
*
|
|
495
|
-
*
|
|
334
|
+
* Default timeout of a test in milliseconds.
|
|
496
335
|
* @default - 5000
|
|
497
|
-
* @experimental
|
|
498
336
|
*/
|
|
499
337
|
readonly testTimeout?: number;
|
|
500
338
|
/**
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
* It is reflected in properties such as location.href.
|
|
504
|
-
*
|
|
339
|
+
* This option sets the URL for the jsdom environment. It is reflected in properties such as location.href.
|
|
505
340
|
* @default - "http://localhost"
|
|
506
|
-
* @experimental
|
|
507
341
|
*/
|
|
508
342
|
readonly testURL?: string;
|
|
509
343
|
/**
|
|
510
|
-
*
|
|
511
|
-
*
|
|
344
|
+
* Setting this value to legacy or fake allows the use of fake timers for functions such as setTimeout.
|
|
512
345
|
* Fake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test.
|
|
513
|
-
*
|
|
514
346
|
* @default - "real"
|
|
515
|
-
* @experimental
|
|
516
347
|
*/
|
|
517
348
|
readonly timers?: string;
|
|
518
349
|
/**
|
|
519
|
-
*
|
|
520
|
-
*
|
|
521
|
-
* A transformer is a module that provides a
|
|
350
|
+
* A map from regular expressions to paths to transformers. A transformer is a module that provides a
|
|
522
351
|
* synchronous function for transforming source files.
|
|
523
|
-
*
|
|
524
352
|
* @default - {"\\.[jt]sx?$": "babel-jest"}
|
|
525
|
-
* @experimental
|
|
526
353
|
*/
|
|
527
354
|
readonly transform?: {
|
|
528
355
|
[key: string]: string | [string, any];
|
|
529
356
|
};
|
|
530
357
|
/**
|
|
531
|
-
*
|
|
532
|
-
*
|
|
358
|
+
* An array of regexp pattern strings that are matched against all source file paths before transformation.
|
|
533
359
|
* If the test path matches any of the patterns, it will not be transformed.
|
|
534
|
-
*
|
|
535
360
|
* @default - ["/node_modules/", "\\.pnp\\.[^\\\/]+$"]
|
|
536
|
-
* @experimental
|
|
537
361
|
*/
|
|
538
362
|
readonly transformIgnorePatterns?: string[];
|
|
539
363
|
/**
|
|
540
|
-
*
|
|
541
|
-
*
|
|
542
|
-
* If a module's path matches any of the patterns in this list, it
|
|
364
|
+
* An array of regexp pattern strings that are matched against all modules before the module loader will
|
|
365
|
+
* automatically return a mock for them. If a module's path matches any of the patterns in this list, it
|
|
543
366
|
* will not be automatically mocked by the module loader.
|
|
544
|
-
*
|
|
545
367
|
* @default - []
|
|
546
|
-
* @experimental
|
|
547
368
|
*/
|
|
548
369
|
readonly unmockedModulePathPatterns?: string[];
|
|
549
370
|
/**
|
|
550
|
-
*
|
|
551
|
-
*
|
|
552
|
-
* All errors will also
|
|
371
|
+
* Indicates whether each individual test should be reported during the run. All errors will also
|
|
553
372
|
* still be shown on the bottom after execution. Note that if there is only one test file being run
|
|
554
373
|
* it will default to true.
|
|
555
|
-
*
|
|
556
374
|
* @default - false
|
|
557
|
-
* @experimental
|
|
558
375
|
*/
|
|
559
376
|
readonly verbose?: boolean;
|
|
560
377
|
/**
|
|
561
|
-
*
|
|
562
|
-
*
|
|
563
|
-
* If the file path matches any of the patterns, when it is updated, it will not trigger
|
|
378
|
+
* An array of RegExp patterns that are matched against all source file paths before re-running tests
|
|
379
|
+
* in watch mode. If the file path matches any of the patterns, when it is updated, it will not trigger
|
|
564
380
|
* a re-run of tests.
|
|
565
|
-
*
|
|
566
381
|
* @default - []
|
|
567
|
-
* @experimental
|
|
568
382
|
*/
|
|
569
383
|
readonly watchPathIgnorePatterns?: string[];
|
|
570
384
|
/**
|
|
385
|
+
*
|
|
571
386
|
* @default -
|
|
572
|
-
* @experimental
|
|
573
387
|
*/
|
|
574
388
|
readonly watchPlugins?: [string | [string, any]];
|
|
575
389
|
/**
|
|
576
|
-
*
|
|
577
|
-
*
|
|
390
|
+
* Whether to use watchman for file crawling.
|
|
578
391
|
* @default - true
|
|
579
|
-
* @experimental
|
|
580
392
|
*/
|
|
581
393
|
readonly watchman?: boolean;
|
|
582
394
|
/**
|
|
@@ -584,134 +396,85 @@ export interface JestConfigOptions {
|
|
|
584
396
|
*/
|
|
585
397
|
readonly [name: string]: any;
|
|
586
398
|
}
|
|
587
|
-
/**
|
|
588
|
-
* @experimental
|
|
589
|
-
*/
|
|
590
399
|
export interface JestOptions {
|
|
591
400
|
/**
|
|
592
|
-
*
|
|
593
|
-
*
|
|
594
|
-
* Deprecated
|
|
595
|
-
*
|
|
401
|
+
* Collect coverage. Deprecated
|
|
596
402
|
* @default true
|
|
597
403
|
* @deprecated use jestConfig.collectCoverage
|
|
598
404
|
*/
|
|
599
405
|
readonly coverage?: boolean;
|
|
600
406
|
/**
|
|
601
|
-
*
|
|
407
|
+
* Include the `text` coverage reporter, which means that coverage summary is printed
|
|
408
|
+
* at the end of the jest execution.
|
|
602
409
|
*
|
|
603
410
|
* @default true
|
|
604
|
-
* @experimental
|
|
605
411
|
*/
|
|
606
412
|
readonly coverageText?: boolean;
|
|
607
413
|
/**
|
|
608
|
-
*
|
|
609
|
-
*
|
|
414
|
+
* Defines `testPathIgnorePatterns` and `coveragePathIgnorePatterns`
|
|
610
415
|
* @default ["/node_modules/"]
|
|
611
416
|
* @deprecated use jestConfig.coveragePathIgnorePatterns or jestConfig.testPathIgnorePatterns respectively
|
|
612
417
|
*/
|
|
613
418
|
readonly ignorePatterns?: string[];
|
|
614
419
|
/**
|
|
615
|
-
*
|
|
420
|
+
* Result processing with jest-junit.
|
|
616
421
|
*
|
|
617
422
|
* Output directory is `test-reports/`.
|
|
618
423
|
*
|
|
619
424
|
* @default true
|
|
620
|
-
* @experimental
|
|
621
425
|
*/
|
|
622
426
|
readonly junitReporting?: boolean;
|
|
623
427
|
/**
|
|
624
|
-
*
|
|
428
|
+
* Preserve the default Jest reporter when additional reporters are added.
|
|
625
429
|
*
|
|
626
430
|
* @default true
|
|
627
|
-
* @experimental
|
|
628
431
|
*/
|
|
629
432
|
readonly preserveDefaultReporters?: boolean;
|
|
630
433
|
/**
|
|
631
|
-
*
|
|
434
|
+
* The version of jest to use.
|
|
632
435
|
*
|
|
633
436
|
* @default - installs the latest jest version
|
|
634
|
-
* @experimental
|
|
635
437
|
*/
|
|
636
438
|
readonly jestVersion?: string;
|
|
637
439
|
/**
|
|
638
|
-
*
|
|
440
|
+
* Path to JSON config file for Jest
|
|
639
441
|
*
|
|
640
442
|
* @default - No separate config file, jest settings are stored in package.json
|
|
641
|
-
* @experimental
|
|
642
443
|
*/
|
|
643
444
|
readonly configFilePath?: string;
|
|
644
445
|
/**
|
|
645
|
-
*
|
|
646
|
-
*
|
|
446
|
+
* Jest configuration.
|
|
647
447
|
* @default - default jest configuration
|
|
648
|
-
* @experimental
|
|
649
448
|
*/
|
|
650
449
|
readonly jestConfig?: JestConfigOptions;
|
|
651
450
|
}
|
|
652
|
-
/**
|
|
653
|
-
* @experimental
|
|
654
|
-
*/
|
|
655
451
|
export interface CoverageThreshold {
|
|
656
|
-
/**
|
|
657
|
-
* @experimental
|
|
658
|
-
*/
|
|
659
452
|
readonly branches?: number;
|
|
660
|
-
/**
|
|
661
|
-
* @experimental
|
|
662
|
-
*/
|
|
663
453
|
readonly functions?: number;
|
|
664
|
-
/**
|
|
665
|
-
* @experimental
|
|
666
|
-
*/
|
|
667
454
|
readonly lines?: number;
|
|
668
|
-
/**
|
|
669
|
-
* @experimental
|
|
670
|
-
*/
|
|
671
455
|
readonly statements?: number;
|
|
672
456
|
}
|
|
673
|
-
/**
|
|
674
|
-
* @experimental
|
|
675
|
-
*/
|
|
676
457
|
export interface HasteConfig {
|
|
677
|
-
/**
|
|
678
|
-
* @experimental
|
|
679
|
-
*/
|
|
680
458
|
readonly computeSha1?: boolean;
|
|
681
|
-
/**
|
|
682
|
-
* @experimental
|
|
683
|
-
*/
|
|
684
459
|
readonly defaultPlatform?: string | undefined;
|
|
685
|
-
/**
|
|
686
|
-
* @experimental
|
|
687
|
-
*/
|
|
688
460
|
readonly hasteImplModulePath?: string;
|
|
689
|
-
/**
|
|
690
|
-
* @experimental
|
|
691
|
-
*/
|
|
692
461
|
readonly platforms?: Array<string>;
|
|
693
|
-
/**
|
|
694
|
-
* @experimental
|
|
695
|
-
*/
|
|
696
462
|
readonly throwOnModuleCollision?: boolean;
|
|
697
463
|
}
|
|
698
464
|
declare type JestReporter = [string, {
|
|
699
465
|
[key: string]: any;
|
|
700
466
|
}] | string;
|
|
701
467
|
/**
|
|
702
|
-
*
|
|
468
|
+
* Installs the following npm scripts:
|
|
703
469
|
*
|
|
704
470
|
* - `test` will run `jest --passWithNoTests`
|
|
705
471
|
* - `test:watch` will run `jest --watch`
|
|
706
472
|
* - `test:update` will run `jest -u`
|
|
707
473
|
*
|
|
708
|
-
* @experimental
|
|
709
474
|
*/
|
|
710
475
|
export declare class Jest {
|
|
711
476
|
/**
|
|
712
|
-
*
|
|
713
|
-
*
|
|
714
|
-
* @experimental
|
|
477
|
+
* Escape hatch.
|
|
715
478
|
*/
|
|
716
479
|
readonly config: any;
|
|
717
480
|
private readonly testMatch;
|
|
@@ -723,35 +486,19 @@ export declare class Jest {
|
|
|
723
486
|
private readonly reporters;
|
|
724
487
|
private readonly jestConfig?;
|
|
725
488
|
private _snapshotResolver;
|
|
726
|
-
/**
|
|
727
|
-
* @experimental
|
|
728
|
-
*/
|
|
729
489
|
constructor(project: NodeProject, options?: JestOptions);
|
|
730
490
|
/**
|
|
731
|
-
*
|
|
732
|
-
*
|
|
733
|
-
* @param pattern glob pattern to match for tests.
|
|
734
|
-
* @experimental
|
|
491
|
+
* Adds a test match pattern.
|
|
492
|
+
* @param pattern glob pattern to match for tests
|
|
735
493
|
*/
|
|
736
494
|
addTestMatch(pattern: string): void;
|
|
737
495
|
/**
|
|
738
|
-
*
|
|
739
|
-
*
|
|
496
|
+
* Adds a watch ignore pattern.
|
|
740
497
|
* @param pattern The pattern (regular expression).
|
|
741
|
-
* @experimental
|
|
742
498
|
*/
|
|
743
499
|
addWatchIgnorePattern(pattern: string): void;
|
|
744
|
-
/**
|
|
745
|
-
* @experimental
|
|
746
|
-
*/
|
|
747
500
|
addIgnorePattern(pattern: string): void;
|
|
748
|
-
/**
|
|
749
|
-
* @experimental
|
|
750
|
-
*/
|
|
751
501
|
addReporter(reporter: JestReporter): void;
|
|
752
|
-
/**
|
|
753
|
-
* @experimental
|
|
754
|
-
*/
|
|
755
502
|
addSnapshotResolver(file: string): void;
|
|
756
503
|
private configureTestCommand;
|
|
757
504
|
}
|