@modern-js/plugin-testing 0.0.0-next-1678932293161 → 0.0.0-next-1678939088213
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/CHANGELOG.md +7 -10
- package/dist/types/base/config/index.d.ts +115 -1
- package/dist/types/base/config/testConfigOperator.d.ts +115 -1
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
# @modern-js/plugin-testing
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-1678939088213
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
- fca9731f6: chore: upgrade jest and puppeteer
|
|
8
|
-
chore: 升级 jest 和 puppeteer 到 latest
|
|
9
7
|
- Updated dependencies [e8c580125]
|
|
10
|
-
- Updated dependencies [fca9731f6]
|
|
11
8
|
- Updated dependencies [7035d5c22]
|
|
12
9
|
- Updated dependencies [49bb8cd0e]
|
|
13
10
|
- Updated dependencies [755a05357]
|
|
14
|
-
- @modern-js/runtime@0.0.0-next-
|
|
15
|
-
- @modern-js/
|
|
16
|
-
- @modern-js/babel-preset-app@0.0.0-next-
|
|
17
|
-
- @modern-js/
|
|
18
|
-
- @modern-js/plugin@0.0.0-next-
|
|
19
|
-
- @modern-js/utils@0.0.0-next-
|
|
11
|
+
- @modern-js/runtime@0.0.0-next-1678939088213
|
|
12
|
+
- @modern-js/prod-server@0.0.0-next-1678939088213
|
|
13
|
+
- @modern-js/babel-preset-app@0.0.0-next-1678939088213
|
|
14
|
+
- @modern-js/babel-compiler@0.0.0-next-1678939088213
|
|
15
|
+
- @modern-js/plugin@0.0.0-next-1678939088213
|
|
16
|
+
- @modern-js/utils@0.0.0-next-1678939088213
|
|
20
17
|
|
|
21
18
|
## 2.8.0
|
|
22
19
|
|
|
@@ -7,7 +7,121 @@ import { TestConfigOperator } from './testConfigOperator';
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
declare const getJestUtils: (testConfig: TestConfig) => TestConfigOperator;
|
|
10
|
-
declare const patchConfig: (testOperator: TestConfigOperator) => Promise<
|
|
10
|
+
declare const patchConfig: (testOperator: TestConfigOperator) => Promise<Partial<{
|
|
11
|
+
automock: boolean;
|
|
12
|
+
bail: number | boolean;
|
|
13
|
+
cache: boolean;
|
|
14
|
+
cacheDirectory: string;
|
|
15
|
+
ci: boolean;
|
|
16
|
+
clearMocks: boolean;
|
|
17
|
+
changedFilesWithAncestor: boolean;
|
|
18
|
+
changedSince: string;
|
|
19
|
+
collectCoverage: boolean;
|
|
20
|
+
collectCoverageFrom: string[];
|
|
21
|
+
collectCoverageOnlyFrom: {
|
|
22
|
+
[key: string]: boolean;
|
|
23
|
+
};
|
|
24
|
+
coverageDirectory: string;
|
|
25
|
+
coveragePathIgnorePatterns: string[];
|
|
26
|
+
coverageProvider: "babel" | "v8";
|
|
27
|
+
coverageReporters: import("@jest/types/build/Config").CoverageReporters;
|
|
28
|
+
coverageThreshold: {
|
|
29
|
+
[path: string]: import("@jest/types/build/Config").CoverageThresholdValue;
|
|
30
|
+
global: import("@jest/types/build/Config").CoverageThresholdValue;
|
|
31
|
+
};
|
|
32
|
+
dependencyExtractor: string;
|
|
33
|
+
detectLeaks: boolean;
|
|
34
|
+
detectOpenHandles: boolean;
|
|
35
|
+
displayName: string | import("@jest/types/build/Config").DisplayName;
|
|
36
|
+
expand: boolean;
|
|
37
|
+
extensionsToTreatAsEsm: string[];
|
|
38
|
+
extraGlobals: string[];
|
|
39
|
+
filter: string;
|
|
40
|
+
findRelatedTests: boolean;
|
|
41
|
+
forceCoverageMatch: string[];
|
|
42
|
+
forceExit: boolean;
|
|
43
|
+
json: boolean;
|
|
44
|
+
globals: import("@jest/types/build/Config").ConfigGlobals;
|
|
45
|
+
globalSetup: string | null | undefined;
|
|
46
|
+
globalTeardown: string | null | undefined;
|
|
47
|
+
haste: import("@jest/types/build/Config").HasteConfig;
|
|
48
|
+
injectGlobals: boolean;
|
|
49
|
+
reporters: (string | import("@jest/types/build/Config").ReporterConfig)[];
|
|
50
|
+
logHeapUsage: boolean;
|
|
51
|
+
lastCommit: boolean;
|
|
52
|
+
listTests: boolean;
|
|
53
|
+
maxConcurrency: number;
|
|
54
|
+
maxWorkers: string | number;
|
|
55
|
+
moduleDirectories: string[];
|
|
56
|
+
moduleFileExtensions: string[];
|
|
57
|
+
moduleLoader: string;
|
|
58
|
+
moduleNameMapper: {
|
|
59
|
+
[key: string]: string | string[];
|
|
60
|
+
};
|
|
61
|
+
modulePathIgnorePatterns: string[];
|
|
62
|
+
modulePaths: string[];
|
|
63
|
+
name: string;
|
|
64
|
+
noStackTrace: boolean;
|
|
65
|
+
notify: boolean;
|
|
66
|
+
notifyMode: string;
|
|
67
|
+
onlyChanged: boolean;
|
|
68
|
+
onlyFailures: boolean;
|
|
69
|
+
outputFile: string;
|
|
70
|
+
passWithNoTests: boolean;
|
|
71
|
+
preprocessorIgnorePatterns: string[];
|
|
72
|
+
preset: string | null | undefined;
|
|
73
|
+
prettierPath: string | null | undefined;
|
|
74
|
+
projects: (string | import("@jest/types/build/Config").InitialProjectOptions)[];
|
|
75
|
+
replname: string | null | undefined;
|
|
76
|
+
resetMocks: boolean;
|
|
77
|
+
resetModules: boolean;
|
|
78
|
+
resolver: string | null | undefined;
|
|
79
|
+
restoreMocks: boolean;
|
|
80
|
+
rootDir: string;
|
|
81
|
+
roots: string[];
|
|
82
|
+
runner: string;
|
|
83
|
+
runTestsByPath: boolean;
|
|
84
|
+
scriptPreprocessor: string;
|
|
85
|
+
setupFiles: string[];
|
|
86
|
+
setupTestFrameworkScriptFile: string;
|
|
87
|
+
setupFilesAfterEnv: string[];
|
|
88
|
+
silent: boolean;
|
|
89
|
+
skipFilter: boolean;
|
|
90
|
+
skipNodeResolution: boolean;
|
|
91
|
+
slowTestThreshold: number;
|
|
92
|
+
snapshotResolver: string;
|
|
93
|
+
snapshotSerializers: string[];
|
|
94
|
+
snapshotFormat: import("@jest/types/build/Config").PrettyFormatOptions;
|
|
95
|
+
errorOnDeprecated: boolean;
|
|
96
|
+
testEnvironment: string;
|
|
97
|
+
testEnvironmentOptions: Record<string, unknown>;
|
|
98
|
+
testFailureExitCode: string | number;
|
|
99
|
+
testLocationInResults: boolean;
|
|
100
|
+
testMatch: string[];
|
|
101
|
+
testNamePattern: string;
|
|
102
|
+
testPathDirs: string[];
|
|
103
|
+
testPathIgnorePatterns: string[];
|
|
104
|
+
testRegex: string | string[];
|
|
105
|
+
testResultsProcessor: string;
|
|
106
|
+
testRunner: string;
|
|
107
|
+
testSequencer: string;
|
|
108
|
+
testURL: string;
|
|
109
|
+
testTimeout: number;
|
|
110
|
+
timers: "legacy" | "modern" | "real" | "fake";
|
|
111
|
+
transform: {
|
|
112
|
+
[regex: string]: string | import("@jest/types/build/Config").TransformerConfig;
|
|
113
|
+
};
|
|
114
|
+
transformIgnorePatterns: string[];
|
|
115
|
+
watchPathIgnorePatterns: string[];
|
|
116
|
+
unmockedModulePathPatterns: string[];
|
|
117
|
+
updateSnapshot: boolean;
|
|
118
|
+
useStderr: boolean;
|
|
119
|
+
verbose?: boolean | undefined;
|
|
120
|
+
watch: boolean;
|
|
121
|
+
watchAll: boolean;
|
|
122
|
+
watchman: boolean;
|
|
123
|
+
watchPlugins: (string | [string, Record<string, unknown>])[];
|
|
124
|
+
}>>;
|
|
11
125
|
export declare const DEFAULT_RESOLVER_PATH: string;
|
|
12
126
|
export type UserConfig = {
|
|
13
127
|
source?: {
|
|
@@ -14,7 +14,121 @@ declare class TestConfigOperator {
|
|
|
14
14
|
setJestConfig(sourceConfig: JestConfig, options?: {
|
|
15
15
|
force: boolean;
|
|
16
16
|
}): void;
|
|
17
|
-
getFinalConfig():
|
|
17
|
+
getFinalConfig(): Partial<{
|
|
18
|
+
automock: boolean;
|
|
19
|
+
bail: number | boolean;
|
|
20
|
+
cache: boolean;
|
|
21
|
+
cacheDirectory: string;
|
|
22
|
+
ci: boolean;
|
|
23
|
+
clearMocks: boolean;
|
|
24
|
+
changedFilesWithAncestor: boolean;
|
|
25
|
+
changedSince: string;
|
|
26
|
+
collectCoverage: boolean;
|
|
27
|
+
collectCoverageFrom: string[];
|
|
28
|
+
collectCoverageOnlyFrom: {
|
|
29
|
+
[key: string]: boolean;
|
|
30
|
+
};
|
|
31
|
+
coverageDirectory: string;
|
|
32
|
+
coveragePathIgnorePatterns: string[];
|
|
33
|
+
coverageProvider: "babel" | "v8";
|
|
34
|
+
coverageReporters: import("@jest/types/build/Config").CoverageReporters;
|
|
35
|
+
coverageThreshold: {
|
|
36
|
+
[path: string]: import("@jest/types/build/Config").CoverageThresholdValue;
|
|
37
|
+
global: import("@jest/types/build/Config").CoverageThresholdValue;
|
|
38
|
+
};
|
|
39
|
+
dependencyExtractor: string;
|
|
40
|
+
detectLeaks: boolean;
|
|
41
|
+
detectOpenHandles: boolean;
|
|
42
|
+
displayName: string | import("@jest/types/build/Config").DisplayName;
|
|
43
|
+
expand: boolean;
|
|
44
|
+
extensionsToTreatAsEsm: string[];
|
|
45
|
+
extraGlobals: string[];
|
|
46
|
+
filter: string;
|
|
47
|
+
findRelatedTests: boolean;
|
|
48
|
+
forceCoverageMatch: string[];
|
|
49
|
+
forceExit: boolean;
|
|
50
|
+
json: boolean;
|
|
51
|
+
globals: import("@jest/types/build/Config").ConfigGlobals;
|
|
52
|
+
globalSetup: string | null | undefined;
|
|
53
|
+
globalTeardown: string | null | undefined;
|
|
54
|
+
haste: import("@jest/types/build/Config").HasteConfig;
|
|
55
|
+
injectGlobals: boolean;
|
|
56
|
+
reporters: (string | import("@jest/types/build/Config").ReporterConfig)[];
|
|
57
|
+
logHeapUsage: boolean;
|
|
58
|
+
lastCommit: boolean;
|
|
59
|
+
listTests: boolean;
|
|
60
|
+
maxConcurrency: number;
|
|
61
|
+
maxWorkers: string | number;
|
|
62
|
+
moduleDirectories: string[];
|
|
63
|
+
moduleFileExtensions: string[];
|
|
64
|
+
moduleLoader: string;
|
|
65
|
+
moduleNameMapper: {
|
|
66
|
+
[key: string]: string | string[];
|
|
67
|
+
};
|
|
68
|
+
modulePathIgnorePatterns: string[];
|
|
69
|
+
modulePaths: string[];
|
|
70
|
+
name: string;
|
|
71
|
+
noStackTrace: boolean;
|
|
72
|
+
notify: boolean;
|
|
73
|
+
notifyMode: string;
|
|
74
|
+
onlyChanged: boolean;
|
|
75
|
+
onlyFailures: boolean;
|
|
76
|
+
outputFile: string;
|
|
77
|
+
passWithNoTests: boolean;
|
|
78
|
+
preprocessorIgnorePatterns: string[];
|
|
79
|
+
preset: string | null | undefined;
|
|
80
|
+
prettierPath: string | null | undefined;
|
|
81
|
+
projects: (string | import("@jest/types/build/Config").InitialProjectOptions)[];
|
|
82
|
+
replname: string | null | undefined;
|
|
83
|
+
resetMocks: boolean;
|
|
84
|
+
resetModules: boolean;
|
|
85
|
+
resolver: string | null | undefined;
|
|
86
|
+
restoreMocks: boolean;
|
|
87
|
+
rootDir: string;
|
|
88
|
+
roots: string[];
|
|
89
|
+
runner: string;
|
|
90
|
+
runTestsByPath: boolean;
|
|
91
|
+
scriptPreprocessor: string;
|
|
92
|
+
setupFiles: string[];
|
|
93
|
+
setupTestFrameworkScriptFile: string;
|
|
94
|
+
setupFilesAfterEnv: string[];
|
|
95
|
+
silent: boolean;
|
|
96
|
+
skipFilter: boolean;
|
|
97
|
+
skipNodeResolution: boolean;
|
|
98
|
+
slowTestThreshold: number;
|
|
99
|
+
snapshotResolver: string;
|
|
100
|
+
snapshotSerializers: string[];
|
|
101
|
+
snapshotFormat: import("@jest/types/build/Config").PrettyFormatOptions;
|
|
102
|
+
errorOnDeprecated: boolean;
|
|
103
|
+
testEnvironment: string;
|
|
104
|
+
testEnvironmentOptions: Record<string, unknown>;
|
|
105
|
+
testFailureExitCode: string | number;
|
|
106
|
+
testLocationInResults: boolean;
|
|
107
|
+
testMatch: string[];
|
|
108
|
+
testNamePattern: string;
|
|
109
|
+
testPathDirs: string[];
|
|
110
|
+
testPathIgnorePatterns: string[];
|
|
111
|
+
testRegex: string | string[];
|
|
112
|
+
testResultsProcessor: string;
|
|
113
|
+
testRunner: string;
|
|
114
|
+
testSequencer: string;
|
|
115
|
+
testURL: string;
|
|
116
|
+
testTimeout: number;
|
|
117
|
+
timers: "legacy" | "modern" | "real" | "fake";
|
|
118
|
+
transform: {
|
|
119
|
+
[regex: string]: string | import("@jest/types/build/Config").TransformerConfig;
|
|
120
|
+
};
|
|
121
|
+
transformIgnorePatterns: string[];
|
|
122
|
+
watchPathIgnorePatterns: string[];
|
|
123
|
+
unmockedModulePathPatterns: string[];
|
|
124
|
+
updateSnapshot: boolean;
|
|
125
|
+
useStderr: boolean;
|
|
126
|
+
verbose?: boolean | undefined;
|
|
127
|
+
watch: boolean;
|
|
128
|
+
watchAll: boolean;
|
|
129
|
+
watchman: boolean;
|
|
130
|
+
watchPlugins: (string | [string, Record<string, unknown>])[];
|
|
131
|
+
}>;
|
|
18
132
|
}
|
|
19
133
|
|
|
20
134
|
export { TestConfigOperator };
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.0-next-
|
|
14
|
+
"version": "0.0.0-next-1678939088213",
|
|
15
15
|
"jsnext:source": "./src/cli/index.ts",
|
|
16
16
|
"types": "./dist/types/cli/index.d.ts",
|
|
17
17
|
"main": "./dist/cjs/cli/index.js",
|
|
@@ -103,21 +103,19 @@
|
|
|
103
103
|
"babel-jest": "^27.0.6",
|
|
104
104
|
"enhanced-resolve": "^5.8.3",
|
|
105
105
|
"identity-obj-proxy": "^3.0.0",
|
|
106
|
-
"jest": "^
|
|
107
|
-
"jest
|
|
108
|
-
"@jest/types": "^29.5.0",
|
|
109
|
-
"ts-jest": "^29.0.5",
|
|
106
|
+
"jest": "^27.0.6",
|
|
107
|
+
"ts-jest": "^27.0.4",
|
|
110
108
|
"yargs": "^17.0.1",
|
|
111
|
-
"@modern-js/babel-compiler": "0.0.0-next-
|
|
112
|
-
"@modern-js/
|
|
113
|
-
"@modern-js/
|
|
114
|
-
"@modern-js/
|
|
115
|
-
"@modern-js/
|
|
109
|
+
"@modern-js/babel-compiler": "0.0.0-next-1678939088213",
|
|
110
|
+
"@modern-js/babel-preset-app": "0.0.0-next-1678939088213",
|
|
111
|
+
"@modern-js/prod-server": "0.0.0-next-1678939088213",
|
|
112
|
+
"@modern-js/utils": "0.0.0-next-1678939088213",
|
|
113
|
+
"@modern-js/plugin": "0.0.0-next-1678939088213"
|
|
116
114
|
},
|
|
117
115
|
"peerDependencies": {
|
|
118
116
|
"react": ">=17",
|
|
119
117
|
"react-dom": ">=17",
|
|
120
|
-
"@modern-js/runtime": "0.0.0-next-
|
|
118
|
+
"@modern-js/runtime": "0.0.0-next-1678939088213"
|
|
121
119
|
},
|
|
122
120
|
"peerDependenciesMeta": {
|
|
123
121
|
"@modern-js/runtime": {
|
|
@@ -127,17 +125,19 @@
|
|
|
127
125
|
"devDependencies": {
|
|
128
126
|
"react": "^18",
|
|
129
127
|
"react-dom": "^18",
|
|
130
|
-
"@types/jest": "^
|
|
128
|
+
"@types/jest": "^27",
|
|
131
129
|
"@types/supertest": "^2.0.11",
|
|
132
130
|
"@types/node": "^14",
|
|
133
131
|
"@types/yargs": "^17.0.2",
|
|
132
|
+
"@jest/types": "^27.0.6",
|
|
133
|
+
"jest": "^27",
|
|
134
134
|
"typescript": "^4",
|
|
135
|
-
"@modern-js/core": "0.0.0-next-
|
|
136
|
-
"@modern-js/types": "0.0.0-next-
|
|
137
|
-
"@modern-js/runtime": "0.0.0-next-
|
|
138
|
-
"@modern-js/bff-core": "0.0.0-next-
|
|
139
|
-
"@scripts/build": "0.0.0-next-
|
|
140
|
-
"@scripts/jest-config": "0.0.0-next-
|
|
135
|
+
"@modern-js/core": "0.0.0-next-1678939088213",
|
|
136
|
+
"@modern-js/types": "0.0.0-next-1678939088213",
|
|
137
|
+
"@modern-js/runtime": "0.0.0-next-1678939088213",
|
|
138
|
+
"@modern-js/bff-core": "0.0.0-next-1678939088213",
|
|
139
|
+
"@scripts/build": "0.0.0-next-1678939088213",
|
|
140
|
+
"@scripts/jest-config": "0.0.0-next-1678939088213"
|
|
141
141
|
},
|
|
142
142
|
"sideEffects": false,
|
|
143
143
|
"modernConfig": {},
|