@react-native-harness/cli 1.0.0-alpha.15 → 1.0.0-alpha.17
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/dist/commands/test.d.ts.map +1 -1
- package/dist/commands/test.js +4 -2
- package/dist/errors/errorHandler.d.ts +1 -1
- package/dist/errors/errorHandler.d.ts.map +1 -1
- package/dist/errors/errorHandler.js +111 -109
- package/dist/external.d.ts +11 -0
- package/dist/external.d.ts.map +1 -0
- package/dist/external.js +27 -0
- package/dist/index.js +58 -49
- package/dist/jest.d.ts +2 -0
- package/dist/jest.d.ts.map +1 -0
- package/dist/jest.js +7 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +26 -8
- package/src/errors/errorHandler.ts +113 -121
- package/src/external.ts +47 -0
- package/src/index.ts +65 -72
- package/src/commands/test.ts +0 -228
- package/src/discovery/index.ts +0 -2
- package/src/discovery/testDiscovery.ts +0 -50
|
@@ -16,211 +16,203 @@ import {
|
|
|
16
16
|
MetroPortUnavailableError,
|
|
17
17
|
} from './errors.js';
|
|
18
18
|
|
|
19
|
-
export const
|
|
19
|
+
export const formatError = (error: unknown): string => {
|
|
20
|
+
const lines: string[] = [];
|
|
21
|
+
|
|
20
22
|
if (error instanceof AssertionError) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
lines.push(`\n❌ Assertion Error`);
|
|
24
|
+
lines.push(`\nError: ${error.message}`);
|
|
25
|
+
lines.push(`\nPlease check your configuration and try again.`);
|
|
24
26
|
} else if (error instanceof ConfigValidationError) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
lines.push(`\n❌ Configuration Error`);
|
|
28
|
+
lines.push(`\nFile: ${error.filePath}`);
|
|
29
|
+
lines.push(`\nValidation errors:`);
|
|
28
30
|
error.validationErrors.forEach((err) => {
|
|
29
|
-
|
|
31
|
+
lines.push(` • ${err}`);
|
|
30
32
|
});
|
|
31
|
-
|
|
33
|
+
lines.push(`\nPlease fix the configuration errors and try again.`);
|
|
32
34
|
} else if (error instanceof ConfigNotFoundError) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
lines.push(`\n❌ Configuration Not Found`);
|
|
36
|
+
lines.push(
|
|
35
37
|
`\nCould not find 'rn-harness.config' in '${error.searchPath}' or any parent directories.`
|
|
36
38
|
);
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
lines.push(`\nSupported file extensions: .js, .mjs, .cjs, .json`);
|
|
40
|
+
lines.push(
|
|
39
41
|
`\nPlease create a configuration file or run from a directory that contains one.`
|
|
40
42
|
);
|
|
41
43
|
} else if (error instanceof ConfigLoadError) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
lines.push(`\n❌ Configuration Load Error`);
|
|
45
|
+
lines.push(`\nFile: ${error.filePath}`);
|
|
46
|
+
lines.push(`Error: ${error.message}`);
|
|
45
47
|
if (error.cause) {
|
|
46
|
-
|
|
48
|
+
lines.push(`\nCause: ${error.cause.message}`);
|
|
47
49
|
}
|
|
48
|
-
|
|
49
|
-
`\nPlease check your configuration file syntax and try again.`
|
|
50
|
-
);
|
|
50
|
+
lines.push(`\nPlease check your configuration file syntax and try again.`);
|
|
51
51
|
} else if (error instanceof NoRunnerSpecifiedError) {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
lines.push('\n❌ No runner specified');
|
|
53
|
+
lines.push(
|
|
54
54
|
'\nPlease specify a runner name or set a defaultRunner in your config.'
|
|
55
55
|
);
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
lines.push('\nUsage: react-native-harness test [runner-name] [pattern]');
|
|
57
|
+
lines.push('\nAvailable runners:');
|
|
58
58
|
error.availableRunners.forEach((r) => {
|
|
59
|
-
|
|
59
|
+
lines.push(` • ${r.name} (${r.platform})`);
|
|
60
60
|
});
|
|
61
|
-
|
|
61
|
+
lines.push(
|
|
62
62
|
'\nTo set a default runner, add "defaultRunner" to your config:'
|
|
63
63
|
);
|
|
64
|
-
|
|
64
|
+
lines.push(' { "defaultRunner": "your-runner-name" }');
|
|
65
65
|
} else if (error instanceof RunnerNotFoundError) {
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
lines.push(`\n❌ Runner "${error.runnerName}" not found`);
|
|
67
|
+
lines.push('\nAvailable runners:');
|
|
68
68
|
error.availableRunners.forEach((r) => {
|
|
69
|
-
|
|
69
|
+
lines.push(` • ${r.name} (${r.platform})`);
|
|
70
70
|
});
|
|
71
|
-
|
|
71
|
+
lines.push('\nTo add a new runner, update your rn-harness.config file.');
|
|
72
72
|
} else if (error instanceof EnvironmentInitializationError) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
lines.push(`\n❌ Environment Initialization Error`);
|
|
74
|
+
lines.push(`\nRunner: ${error.runnerName} (${error.platform})`);
|
|
75
|
+
lines.push(`\nError: ${error.message}`);
|
|
76
76
|
if (error.details) {
|
|
77
|
-
|
|
77
|
+
lines.push(`\nDetails: ${error.details}`);
|
|
78
78
|
}
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
lines.push(`\nTroubleshooting steps:`);
|
|
80
|
+
lines.push(
|
|
81
81
|
` • Verify that ${error.platform} development environment is properly set up`
|
|
82
82
|
);
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
lines.push(` • Check that the app is built and ready for testing`);
|
|
84
|
+
lines.push(` • Ensure all required dependencies are installed`);
|
|
85
85
|
if (error.platform === 'ios') {
|
|
86
|
-
|
|
86
|
+
lines.push(` • Verify Xcode and iOS Simulator are working correctly`);
|
|
87
87
|
} else if (error.platform === 'android') {
|
|
88
|
-
|
|
89
|
-
` • Verify Android SDK and emulator are working correctly`
|
|
90
|
-
);
|
|
88
|
+
lines.push(` • Verify Android SDK and emulator are working correctly`);
|
|
91
89
|
}
|
|
92
|
-
|
|
93
|
-
`\nPlease check your environment configuration and try again.`
|
|
94
|
-
);
|
|
90
|
+
lines.push(`\nPlease check your environment configuration and try again.`);
|
|
95
91
|
} else if (error instanceof TestExecutionError) {
|
|
96
|
-
|
|
97
|
-
|
|
92
|
+
lines.push(`\n❌ Test Execution Error`);
|
|
93
|
+
lines.push(`\nFile: ${error.testFile}`);
|
|
98
94
|
if (error.testSuite) {
|
|
99
|
-
|
|
95
|
+
lines.push(`\nSuite: ${error.testSuite}`);
|
|
100
96
|
}
|
|
101
97
|
if (error.testName) {
|
|
102
|
-
|
|
98
|
+
lines.push(`\nTest: ${error.testName}`);
|
|
103
99
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
);
|
|
112
|
-
console.error(`\nPlease check your test file and try again.`);
|
|
100
|
+
lines.push(`\nError: ${error.message}`);
|
|
101
|
+
lines.push(`\nTroubleshooting steps:`);
|
|
102
|
+
lines.push(` • Check the test file syntax and logic`);
|
|
103
|
+
lines.push(` • Verify all test dependencies are available`);
|
|
104
|
+
lines.push(` • Ensure the app is in the expected state for the test`);
|
|
105
|
+
lines.push(` • Check device/emulator logs for additional error details`);
|
|
106
|
+
lines.push(`\nPlease check your test file and try again.`);
|
|
113
107
|
} else if (error instanceof RpcClientError) {
|
|
114
|
-
|
|
115
|
-
|
|
108
|
+
lines.push(`\n❌ RPC Client Error`);
|
|
109
|
+
lines.push(`\nError: ${error.message}`);
|
|
116
110
|
if (error.bridgePort) {
|
|
117
|
-
|
|
111
|
+
lines.push(`\nBridge Port: ${error.bridgePort}`);
|
|
118
112
|
}
|
|
119
113
|
if (error.connectionStatus) {
|
|
120
|
-
|
|
114
|
+
lines.push(`\nConnection Status: ${error.connectionStatus}`);
|
|
121
115
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
116
|
+
lines.push(`\nTroubleshooting steps:`);
|
|
117
|
+
lines.push(` • Verify the React Native app is running and connected`);
|
|
118
|
+
lines.push(` • Check that the bridge port is not blocked by firewall`);
|
|
119
|
+
lines.push(
|
|
126
120
|
` • Ensure the app has the React Native Harness runtime integrated`
|
|
127
121
|
);
|
|
128
|
-
|
|
129
|
-
|
|
122
|
+
lines.push(` • Try restarting the app and test harness`);
|
|
123
|
+
lines.push(`\nPlease check your bridge connection and try again.`);
|
|
130
124
|
} else if (error instanceof AppNotInstalledError) {
|
|
131
|
-
|
|
125
|
+
lines.push(`\n❌ App Not Installed`);
|
|
132
126
|
const deviceType =
|
|
133
127
|
error.platform === 'ios'
|
|
134
128
|
? 'simulator'
|
|
135
129
|
: error.platform === 'android'
|
|
136
130
|
? 'emulator'
|
|
137
131
|
: 'virtual device';
|
|
138
|
-
|
|
132
|
+
lines.push(
|
|
139
133
|
`\nThe app "${error.bundleId}" is not installed on ${deviceType} "${error.deviceName}".`
|
|
140
134
|
);
|
|
141
|
-
|
|
135
|
+
lines.push(`\nTo resolve this issue:`);
|
|
142
136
|
if (error.platform === 'ios') {
|
|
143
|
-
|
|
137
|
+
lines.push(
|
|
144
138
|
` • Build and install the app: npx react-native run-ios --simulator="${error.deviceName}"`
|
|
145
139
|
);
|
|
146
|
-
|
|
140
|
+
lines.push(
|
|
147
141
|
` • Or install from Xcode: Open ios/*.xcworkspace and run the project`
|
|
148
142
|
);
|
|
149
143
|
} else if (error.platform === 'android') {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
);
|
|
153
|
-
console.error(
|
|
144
|
+
lines.push(` • Build and install the app: npx react-native run-android`);
|
|
145
|
+
lines.push(
|
|
154
146
|
` • Or build manually: ./gradlew assembleDebug && adb install android/app/build/outputs/apk/debug/app-debug.apk`
|
|
155
147
|
);
|
|
156
148
|
} else if (error.platform === 'vega') {
|
|
157
|
-
|
|
158
|
-
|
|
149
|
+
lines.push(` • Build the Vega app: npm run build:app`);
|
|
150
|
+
lines.push(
|
|
159
151
|
` • Install the app: kepler device install-app -p <path-to-vpkg> --device "${error.deviceName}"`
|
|
160
152
|
);
|
|
161
|
-
|
|
153
|
+
lines.push(
|
|
162
154
|
` • Or use the combined command: kepler run-kepler <path-to-vpkg> "${error.bundleId}" -d "${error.deviceName}"`
|
|
163
155
|
);
|
|
164
156
|
}
|
|
165
|
-
|
|
157
|
+
lines.push(`\nPlease install the app and try running the tests again.`);
|
|
166
158
|
} else if (error instanceof BundlingFailedError) {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
159
|
+
lines.push(`\n❌ Test File Bundling Error`);
|
|
160
|
+
lines.push(`\nFile: ${error.modulePath}`);
|
|
161
|
+
lines.push(`\nError: ${error.reason}`);
|
|
162
|
+
lines.push(`\nTroubleshooting steps:`);
|
|
163
|
+
lines.push(` • Check the test file syntax and imports`);
|
|
164
|
+
lines.push(` • Verify all imported modules exist and are accessible`);
|
|
165
|
+
lines.push(` • Ensure the Metro bundler configuration is correct`);
|
|
166
|
+
lines.push(` • Check for any circular dependencies in the test file`);
|
|
167
|
+
lines.push(` • Verify that all required packages are installed`);
|
|
168
|
+
lines.push(`\nPlease fix the bundling issues and try again.`);
|
|
177
169
|
} else if (error instanceof BridgeTimeoutError) {
|
|
178
|
-
|
|
179
|
-
|
|
170
|
+
lines.push(`\n❌ Bridge Connection Timeout`);
|
|
171
|
+
lines.push(
|
|
180
172
|
`\nThe bridge connection timed out after ${error.timeout}ms while waiting for the "${error.runnerName}" (${error.platform}) runner to be ready.`
|
|
181
173
|
);
|
|
182
|
-
|
|
183
|
-
|
|
174
|
+
lines.push(`\nThis usually indicates that:`);
|
|
175
|
+
lines.push(
|
|
184
176
|
` • The React Native app failed to load or connect to the bridge`
|
|
185
177
|
);
|
|
186
|
-
|
|
187
|
-
|
|
178
|
+
lines.push(` • The app crashed during startup`);
|
|
179
|
+
lines.push(
|
|
188
180
|
` • Network connectivity issues between the app and the test harness`
|
|
189
181
|
);
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
182
|
+
lines.push(` • The app is taking longer than expected to initialize`);
|
|
183
|
+
lines.push(`\nTo resolve this issue:`);
|
|
184
|
+
lines.push(
|
|
193
185
|
` • Check that the app is properly installed and can start normally`
|
|
194
186
|
);
|
|
195
|
-
|
|
187
|
+
lines.push(
|
|
196
188
|
` • Verify that the app has the React Native Harness runtime integrated`
|
|
197
189
|
);
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
);
|
|
202
|
-
console.error(
|
|
190
|
+
lines.push(` • Check device/emulator logs for any startup errors`);
|
|
191
|
+
lines.push(` • Ensure the test harness bridge port (3001) is not blocked`);
|
|
192
|
+
lines.push(
|
|
203
193
|
`\nIf the app needs more time to start, consider increasing the timeout in the configuration.`
|
|
204
194
|
);
|
|
205
195
|
} else if (error instanceof MetroPortUnavailableError) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
196
|
+
lines.push(`\n❌ Metro Port Unavailable`);
|
|
197
|
+
lines.push(`\nPort ${error.port} is already in use or unavailable.`);
|
|
198
|
+
lines.push(`\nThis usually indicates that:`);
|
|
199
|
+
lines.push(` • Another Metro bundler instance is already running`);
|
|
200
|
+
lines.push(` • Another application is using port ${error.port}`);
|
|
201
|
+
lines.push(` • The port is blocked by a firewall or security software`);
|
|
202
|
+
lines.push(`\nTo resolve this issue:`);
|
|
203
|
+
lines.push(` • Stop any running Metro bundler instances`);
|
|
204
|
+
lines.push(
|
|
215
205
|
` • Check for other applications using port ${error.port}: lsof -i :${error.port}`
|
|
216
206
|
);
|
|
217
|
-
|
|
218
|
-
|
|
207
|
+
lines.push(` • Kill the process using the port: kill -9 <PID>`);
|
|
208
|
+
lines.push(
|
|
219
209
|
` • Or use a different port by updating your Metro configuration`
|
|
220
210
|
);
|
|
221
|
-
|
|
211
|
+
lines.push(`\nPlease free up the port and try again.`);
|
|
222
212
|
} else {
|
|
223
|
-
|
|
224
|
-
|
|
213
|
+
// Re-throw the error to be handled by the caller
|
|
214
|
+
throw error;
|
|
225
215
|
}
|
|
216
|
+
|
|
217
|
+
return lines.join('');
|
|
226
218
|
};
|
package/src/external.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { TestRunnerConfig } from '@react-native-harness/config';
|
|
2
|
+
import { Environment } from './platforms/platform-adapter.js';
|
|
3
|
+
import {
|
|
4
|
+
BridgeServer,
|
|
5
|
+
getBridgeServer,
|
|
6
|
+
} from '@react-native-harness/bridge/server';
|
|
7
|
+
import { BridgeTimeoutError } from './errors/errors.js';
|
|
8
|
+
import { getPlatformAdapter } from './platforms/platform-registry.js';
|
|
9
|
+
|
|
10
|
+
export type Harness = {
|
|
11
|
+
environment: Environment;
|
|
12
|
+
bridge: BridgeServer;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const getHarness = async (
|
|
16
|
+
runner: TestRunnerConfig
|
|
17
|
+
): Promise<Harness> => {
|
|
18
|
+
const bridgeTimeout = 60000;
|
|
19
|
+
const platformAdapter = await getPlatformAdapter(runner.platform);
|
|
20
|
+
const serverBridge = await getBridgeServer({
|
|
21
|
+
port: 3001,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const readyPromise = new Promise<void>((resolve, reject) => {
|
|
25
|
+
const timeout = setTimeout(() => {
|
|
26
|
+
reject(
|
|
27
|
+
new BridgeTimeoutError(bridgeTimeout, runner.name, runner.platform)
|
|
28
|
+
);
|
|
29
|
+
}, bridgeTimeout);
|
|
30
|
+
|
|
31
|
+
serverBridge.once('ready', () => {
|
|
32
|
+
clearTimeout(timeout);
|
|
33
|
+
resolve();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const environment = await platformAdapter.getEnvironment(runner);
|
|
38
|
+
await readyPromise;
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
environment,
|
|
42
|
+
bridge: serverBridge,
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { formatError } from './errors/errorHandler.js';
|
|
47
|
+
export * from './errors/errors.js';
|
package/src/index.ts
CHANGED
|
@@ -1,78 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { fileURLToPath } from 'url';
|
|
4
|
-
import { dirname, join } from 'path';
|
|
5
|
-
import { testCommand } from './commands/test.js';
|
|
6
|
-
import { handleError } from './errors/errorHandler.js';
|
|
7
|
-
import { logger } from '@react-native-harness/tools';
|
|
1
|
+
import { run, yargsOptions } from 'jest-cli';
|
|
2
|
+
import { getConfig } from '@react-native-harness/config';
|
|
8
3
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
|
|
4
|
+
const checkForOldConfig = async () => {
|
|
5
|
+
try {
|
|
6
|
+
const { config } = await getConfig(process.cwd());
|
|
13
7
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (opts.verbose) {
|
|
27
|
-
logger.setVerbose(true);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
program
|
|
32
|
-
.command('test')
|
|
33
|
-
.description('Run tests using the specified runner')
|
|
34
|
-
.argument(
|
|
35
|
-
'[runner]',
|
|
36
|
-
'test runner name (uses defaultRunner from config if not specified)'
|
|
37
|
-
)
|
|
38
|
-
.argument(
|
|
39
|
-
'[pattern]',
|
|
40
|
-
'glob pattern to match test files (uses config.include if not specified)'
|
|
41
|
-
)
|
|
42
|
-
.option(
|
|
43
|
-
'-t, --testNamePattern <pattern>',
|
|
44
|
-
'Run only tests with names matching regex pattern'
|
|
45
|
-
)
|
|
46
|
-
.option(
|
|
47
|
-
'--testPathPattern <pattern>',
|
|
48
|
-
'Run only test files with paths matching regex pattern'
|
|
49
|
-
)
|
|
50
|
-
.option(
|
|
51
|
-
'--testPathIgnorePatterns <patterns...>',
|
|
52
|
-
'Ignore test files matching these patterns'
|
|
53
|
-
)
|
|
54
|
-
.option(
|
|
55
|
-
'--testMatch <patterns...>',
|
|
56
|
-
'Override config.include with these glob patterns'
|
|
57
|
-
)
|
|
58
|
-
.action(async (runner, pattern, options) => {
|
|
59
|
-
try {
|
|
60
|
-
// Convert CLI pattern argument to testMatch option
|
|
61
|
-
const mergedOptions = {
|
|
62
|
-
...options,
|
|
63
|
-
testMatch: pattern ? [pattern] : options.testMatch,
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
await testCommand(runner, mergedOptions);
|
|
67
|
-
} catch (error) {
|
|
68
|
-
handleError(error);
|
|
8
|
+
if (config.include) {
|
|
9
|
+
console.error('\n❌ Migration Required\n');
|
|
10
|
+
console.error('React Native Harness has migrated to the Jest CLI.');
|
|
11
|
+
console.error(
|
|
12
|
+
'The "include" property in your rn-harness.config file is no longer supported.\n'
|
|
13
|
+
);
|
|
14
|
+
console.error(
|
|
15
|
+
'Please follow the migration guide to update your configuration:'
|
|
16
|
+
);
|
|
17
|
+
console.error(
|
|
18
|
+
'https://react-native-harness.dev/docs/guides/migration-guide\n'
|
|
19
|
+
);
|
|
69
20
|
process.exit(1);
|
|
70
21
|
}
|
|
71
|
-
}
|
|
22
|
+
} catch {
|
|
23
|
+
// Swallow the error - if we can't load the config, let Jest CLI handle it
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const patchYargsOptions = () => {
|
|
28
|
+
yargsOptions.harnessRunner = {
|
|
29
|
+
type: 'string',
|
|
30
|
+
description: 'Specify which Harness runner to use',
|
|
31
|
+
requiresArg: true,
|
|
32
|
+
};
|
|
72
33
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
34
|
+
// Remove all options that are not supported by Harness
|
|
35
|
+
delete yargsOptions.runner;
|
|
36
|
+
delete yargsOptions.testRunner;
|
|
37
|
+
delete yargsOptions.testEnvironment;
|
|
38
|
+
delete yargsOptions.testEnvironmentOptions;
|
|
39
|
+
delete yargsOptions.transform;
|
|
40
|
+
delete yargsOptions.transformIgnorePatterns;
|
|
41
|
+
delete yargsOptions.updateSnapshot;
|
|
42
|
+
delete yargsOptions.workerThreads;
|
|
43
|
+
delete yargsOptions.snapshotSerializers;
|
|
44
|
+
delete yargsOptions.shard;
|
|
45
|
+
delete yargsOptions.runInBand;
|
|
46
|
+
delete yargsOptions.resolver;
|
|
47
|
+
delete yargsOptions.resetMocks;
|
|
48
|
+
delete yargsOptions.resetModules;
|
|
49
|
+
delete yargsOptions.restoreMocks;
|
|
50
|
+
delete yargsOptions.preset;
|
|
51
|
+
delete yargsOptions.prettierPath;
|
|
52
|
+
delete yargsOptions.maxWorkers;
|
|
53
|
+
delete yargsOptions.moduleDirectories;
|
|
54
|
+
delete yargsOptions.moduleFileExtensions;
|
|
55
|
+
delete yargsOptions.moduleNameMapper;
|
|
56
|
+
delete yargsOptions.modulePathIgnorePatterns;
|
|
57
|
+
delete yargsOptions.modulePaths;
|
|
58
|
+
delete yargsOptions.maxConcurrency;
|
|
59
|
+
delete yargsOptions.injectGlobals;
|
|
60
|
+
delete yargsOptions.globalSetup;
|
|
61
|
+
delete yargsOptions.globalTeardown;
|
|
62
|
+
delete yargsOptions.clearMocks;
|
|
63
|
+
delete yargsOptions.globals;
|
|
64
|
+
delete yargsOptions.haste;
|
|
65
|
+
delete yargsOptions.automock;
|
|
66
|
+
delete yargsOptions.coverageProvider;
|
|
67
|
+
delete yargsOptions.logHeapUsage;
|
|
68
|
+
};
|
|
77
69
|
|
|
78
|
-
|
|
70
|
+
patchYargsOptions();
|
|
71
|
+
checkForOldConfig().then(() => run());
|