detox 20.0.1-breaking.new-global-lifecycle.0 → 20.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/Detox-android/com/wix/detox/{20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-javadoc.jar → 20.0.1/detox-20.0.1-javadoc.jar} +0 -0
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1-javadoc.jar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1-javadoc.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1-javadoc.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1-javadoc.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox/{20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-sources.jar → 20.0.1/detox-20.0.1-sources.jar} +0 -0
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1-sources.jar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1-sources.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1-sources.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1-sources.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1.aar +0 -0
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1.aar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1.aar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1.aar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1.aar.sha512 +1 -0
- package/Detox-android/com/wix/detox/{20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.pom → 20.0.1/detox-20.0.1.pom} +1 -7
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1.pom.md5 +1 -0
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1.pom.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1.pom.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.0.1/detox-20.0.1.pom.sha512 +1 -0
- package/Detox-android/com/wix/detox/maven-metadata.xml +4 -4
- package/Detox-android/com/wix/detox/maven-metadata.xml.md5 +1 -1
- package/Detox-android/com/wix/detox/maven-metadata.xml.sha1 +1 -1
- package/Detox-android/com/wix/detox/maven-metadata.xml.sha256 +1 -1
- package/Detox-android/com/wix/detox/maven-metadata.xml.sha512 +1 -1
- package/Detox-ios-src.tbz +0 -0
- package/Detox-ios.tbz +0 -0
- package/README.md +1 -1
- package/android/build.gradle +12 -7
- package/android/detox/build.gradle +13 -9
- package/android/detox/proguard-rules-app.pro +6 -0
- package/android/detox/proguard-rules.pro +3 -0
- package/android/detox/publishing.gradle +27 -27
- package/android/detox/src/full/java/com/wix/detox/DetoxCrashHandler.kt +1 -1
- package/android/detox/src/full/java/com/wix/detox/LaunchArgs.java +9 -0
- package/android/detox/src/full/java/com/wix/detox/TestEngineFacade.kt +1 -1
- package/android/detox/src/full/java/com/wix/detox/reactnative/ReactNativeExtension.kt +15 -2
- package/android/detox/src/full/java/com/wix/detox/reactnative/ReactNativeIdlingResources.kt +43 -38
- package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/IdlingResourceDescription.kt +19 -13
- package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/NetworkIdlingResource.java +33 -30
- package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/timers/DelegatedIdleInterrogationStrategy.kt +7 -27
- package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/timers/IdleInterrogationStrategy.kt +1 -11
- package/android/detox/src/main/java/com/wix/detox/common/TextFileReader.kt +1 -1
- package/android/detox/src/testFull/java/com/wix/detox/espresso/action/DetoxMultiTapSpec.kt +4 -3
- package/android/detox/src/testFull/java/com/wix/detox/reactnative/idlingresources/NetworkIdlingResourcesTest.kt +61 -0
- package/android/detox/src/testFull/java/com/wix/detox/reactnative/idlingresources/timers/DelegatedIdleInterrogationStrategySpec.kt +3 -11
- package/index.d.ts +198 -57
- package/internals.d.ts +219 -45
- package/local-cli/build.js +2 -2
- package/local-cli/build.test.js +14 -14
- package/local-cli/cli.js +8 -6
- package/local-cli/init.js +61 -21
- package/local-cli/rebuild-framework-cache.js +1 -1
- package/local-cli/reset-lock-file.js +16 -0
- package/local-cli/templates/jest.js +13 -10
- package/local-cli/test.js +14 -8
- package/local-cli/test.test.js +148 -61
- package/local-cli/testCommand/TestRunnerCommand.js +78 -72
- package/local-cli/testCommand/builder.js +0 -1
- package/local-cli/testCommand/middlewares.js +4 -13
- package/local-cli/testCommand/warnings.js +0 -3
- package/local-cli/utils/jestInternals.js +4 -1
- package/package.json +23 -16
- package/runners/deprecation.js +42 -44
- package/runners/jest/globalSetup.js +1 -1
- package/runners/jest/globalTeardown.js +1 -1
- package/runners/jest/index.d.ts +60 -0
- package/runners/jest/index.js +3 -8
- package/runners/jest/index.test.js +13 -0
- package/runners/jest/reporters/DetoxReporter.js +33 -2
- package/runners/jest/testEnvironment/index.js +119 -69
- package/runners/jest/testEnvironment/listeners/DetoxCoreListener.js +94 -51
- package/runners/jest/testEnvironment/listeners/DetoxPlatformFilterListener.js +1 -1
- package/runners/jest/testEnvironment/listeners/SpecReporter.js +14 -16
- package/runners/jest/testEnvironment/listeners/WorkerAssignReporter.js +2 -6
- package/runners/jest/testEnvironment/utils/assertJestCircus27.js +17 -3
- package/runners/jest/testEnvironment/utils/assertJestCircus27.test.js +0 -1
- package/src/DetoxWorker.js +105 -62
- package/src/android/core/NativeElement.js +56 -20
- package/src/android/core/NativeExpect.js +28 -9
- package/src/android/interactions/native.js +25 -18
- package/src/artifacts/ArtifactsManager.js +14 -47
- package/src/artifacts/instruments/ios/SimulatorInstrumentsRecording.js +3 -3
- package/src/artifacts/log/ios/SimulatorLogRecording.js +1 -1
- package/src/artifacts/screenshot/SimulatorScreenshotPlugin.js +1 -1
- package/src/artifacts/templates/artifact/Artifact.js +1 -1
- package/src/artifacts/templates/plugin/ArtifactPlugin.js +1 -1
- package/src/artifacts/timeline/TimelineContextTypes.js +7 -0
- package/src/artifacts/utils/temporaryPath.js +18 -7
- package/src/artifacts/video/SimulatorRecordVideoPlugin.js +1 -1
- package/src/client/AsyncWebSocket.js +8 -17
- package/src/client/Client.js +19 -2
- package/src/client/actions/formatters/sync-resources/NetworkFormatter.js +1 -1
- package/src/configuration/collectCliConfig.js +1 -12
- package/src/configuration/composeAppsConfig.js +4 -0
- package/src/configuration/composeDeviceConfig.js +1 -1
- package/src/configuration/composeLoggerConfig.js +19 -10
- package/src/configuration/composeRunnerConfig.js +62 -9
- package/src/configuration/index.js +14 -9
- package/src/configuration/loadExternalConfig.js +1 -1
- package/src/devices/allocation/DeviceAllocator.js +3 -2
- package/src/devices/allocation/drivers/android/emulator/AVDValidator.js +5 -5
- package/src/devices/allocation/drivers/android/emulator/EmulatorAllocDriver.js +4 -3
- package/src/devices/allocation/drivers/android/emulator/EmulatorAllocationHelper.js +1 -1
- package/src/devices/allocation/drivers/android/emulator/EmulatorLauncher.js +3 -2
- package/src/devices/allocation/drivers/android/emulator/EmulatorVersionResolver.js +4 -6
- package/src/devices/allocation/drivers/android/emulator/launchEmulatorProcess.js +1 -1
- package/src/devices/allocation/drivers/android/genycloud/GenyInstanceAllocationHelper.js +1 -1
- package/src/devices/common/drivers/android/genycloud/services/GenyInstanceNaming.js +3 -3
- package/src/devices/common/drivers/android/genycloud/services/GenyRecipesService.js +1 -1
- package/src/devices/common/drivers/android/tools/EmulatorTelnet.js +1 -1
- package/src/devices/common/drivers/android/tools/FreeDeviceFinder.js +1 -1
- package/src/devices/common/drivers/android/tools/MonitoredInstrumentation.js +1 -1
- package/src/devices/common/drivers/ios/tools/AppleSimUtils.js +29 -3
- package/src/devices/lifecycle/GenyGlobalLifecycleHandler.js +13 -15
- package/src/devices/runtime/RuntimeDevice.js +19 -12
- package/src/devices/runtime/drivers/DeviceDriverBase.js +1 -1
- package/src/devices/runtime/drivers/android/AndroidDriver.js +10 -2
- package/src/devices/runtime/drivers/ios/SimulatorDriver.js +1 -1
- package/src/errors/DetoxConfigErrorComposer.js +17 -2
- package/src/ios/expectTwo.js +153 -67
- package/src/ipc/IPCClient.js +12 -12
- package/src/ipc/IPCServer.js +29 -18
- package/src/ipc/{state.js → SessionState.js} +26 -40
- package/src/logger/DetoxLogger.js +261 -157
- package/src/logger/index.js +5 -0
- package/src/logger/utils/BunyanLogger.js +76 -0
- package/src/logger/utils/CategoryThreadDispatcher.js +36 -0
- package/src/logger/utils/DetoxLogFinalizer.js +140 -0
- package/src/logger/utils/MessageStack.js +24 -0
- package/src/logger/utils/ThreadDispatcher.js +61 -0
- package/src/logger/{customConsoleLogger.js → utils/customConsoleLogger.js} +5 -4
- package/src/logger/utils/sanitizeBunyanContext.js +30 -0
- package/src/{utils → logger/utils}/streamUtils.js +51 -17
- package/src/logger/utils/tracerLegacy.js +37 -0
- package/src/realms/DetoxContext.js +78 -65
- package/src/realms/DetoxInternalsFacade.js +8 -12
- package/src/realms/DetoxPrimaryContext.js +104 -72
- package/src/realms/DetoxSecondaryContext.js +29 -32
- package/src/server/DetoxConnection.js +18 -23
- package/src/server/DetoxServer.js +7 -10
- package/src/server/DetoxSession.js +6 -6
- package/src/server/DetoxSessionManager.js +1 -1
- package/src/server/handlers/RegisteredConnectionHandler.js +1 -2
- package/src/symbols.js +16 -22
- package/src/utils/Timer.js +55 -38
- package/src/utils/argparse.js +11 -0
- package/src/utils/childProcess/exec.js +1 -1
- package/src/utils/childProcess/spawn.js +1 -1
- package/src/utils/errorUtils.js +24 -3
- package/src/utils/invocationTraceDescriptions.js +43 -0
- package/src/utils/logger.js +1 -1
- package/src/utils/traceInvocationCall.js +21 -0
- package/src/utils/traceMethods.js +15 -0
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-javadoc.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-javadoc.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-javadoc.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-javadoc.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-sources.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-sources.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-sources.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-sources.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.aar +0 -0
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.aar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.aar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.aar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.aar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.pom.md5 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.pom.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.pom.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.pom.sha512 +0 -1
- package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/timers/DefaultIdleInterrogationStrategy.kt +0 -84
- package/android/detox/src/testFull/java/com/wix/detox/reactnative/idlingresources/timers/DefaultIdleInterrogationStrategySpec.kt +0 -115
- package/runners/jest/deprecation.js +0 -25
- package/src/configuration/utils/warnings.js +0 -12
- package/src/logger/DetoxTraceEventBuilder.js +0 -21
- package/src/logger/DetoxTracer.js +0 -133
- package/src/logger/TraceThreadDispatcher.js +0 -52
- package/src/utils/ChromeTracingExporter.js +0 -54
- package/src/utils/trace.js +0 -19
package/src/symbols.js
CHANGED
@@ -1,56 +1,50 @@
|
|
1
1
|
/**
|
2
2
|
* @type {{
|
3
|
+
* readonly cleanup: unique symbol;
|
3
4
|
* readonly config: unique symbol;
|
4
|
-
* readonly
|
5
|
-
* readonly
|
5
|
+
* readonly getStatus: unique symbol;
|
6
|
+
* readonly init: unique symbol;
|
7
|
+
* readonly installWorker: unique symbol;
|
8
|
+
* readonly logger: unique symbol;
|
6
9
|
* readonly onHookFailure: unique symbol;
|
7
|
-
* readonly onHookStart: unique symbol;
|
8
|
-
* readonly onHookSuccess: unique symbol;
|
9
10
|
* readonly onRunDescribeFinish: unique symbol;
|
10
11
|
* readonly onRunDescribeStart: unique symbol;
|
11
|
-
* readonly onRunFinish: unique symbol;
|
12
|
-
* readonly onRunStart: unique symbol;
|
13
12
|
* readonly onTestDone: unique symbol;
|
14
13
|
* readonly onTestFnFailure: unique symbol;
|
15
|
-
* readonly onTestFnStart: unique symbol;
|
16
|
-
* readonly onTestFnSuccess: unique symbol;
|
17
14
|
* readonly onTestStart: unique symbol;
|
18
|
-
* readonly
|
15
|
+
* readonly reportTestResults: unique symbol;
|
19
16
|
* readonly resolveConfig: unique symbol;
|
20
17
|
* readonly session: unique symbol;
|
21
|
-
* readonly
|
22
|
-
* readonly
|
18
|
+
* readonly tracing: unique symbol;
|
19
|
+
* readonly uninstallWorker: unique symbol;
|
23
20
|
* readonly worker: unique symbol;
|
24
21
|
* }}
|
25
22
|
*/
|
26
23
|
module.exports = {
|
27
24
|
//#region Lifecycle
|
28
|
-
onRunStart: Symbol('run_start'),
|
29
25
|
onRunDescribeStart: Symbol('run_describe_start'),
|
30
26
|
onTestStart: Symbol('test_start'),
|
31
|
-
onHookStart: Symbol('hook_start'),
|
32
27
|
onHookFailure: Symbol('hook_failure'),
|
33
|
-
onHookSuccess: Symbol('hook_success'),
|
34
|
-
onTestFnStart: Symbol('test_fn_start'),
|
35
28
|
onTestFnFailure: Symbol('test_fn_failure'),
|
36
|
-
onTestFnSuccess: Symbol('test_fn_success'),
|
37
29
|
onTestDone: Symbol('test_done'),
|
38
30
|
onRunDescribeFinish: Symbol('run_describe_finish'),
|
39
|
-
onRunFinish: Symbol('run_finish'),
|
40
31
|
//#endregion
|
41
32
|
|
42
33
|
//#region IPC
|
43
|
-
|
34
|
+
reportTestResults: Symbol('reportTestResults'),
|
44
35
|
//#endregion
|
45
36
|
|
46
37
|
//#region Main
|
38
|
+
cleanup: Symbol('cleanup'),
|
47
39
|
config: Symbol('config'),
|
48
|
-
|
49
|
-
|
40
|
+
getStatus: Symbol('getStatus'),
|
41
|
+
init: Symbol('init'),
|
42
|
+
installWorker: Symbol('installWorker'),
|
43
|
+
logger: Symbol('logger'),
|
50
44
|
resolveConfig: Symbol('resolveConfig'),
|
51
45
|
session: Symbol('session'),
|
52
|
-
|
53
|
-
|
46
|
+
tracing: Symbol('tracing'),
|
47
|
+
uninstallWorker: Symbol('uninstallWorker'),
|
54
48
|
worker: Symbol('worker'),
|
55
49
|
//#endregion
|
56
50
|
};
|
package/src/utils/Timer.js
CHANGED
@@ -1,65 +1,82 @@
|
|
1
|
-
|
2
|
-
const DetoxRuntimeError = require('../errors/DetoxRuntimeError');
|
1
|
+
const { DetoxRuntimeError, DetoxInternalError } = require('../errors');
|
3
2
|
|
4
3
|
const Deferred = require('./Deferred');
|
5
4
|
|
6
5
|
class Timer {
|
6
|
+
constructor() {
|
7
|
+
/** @private */
|
8
|
+
this._eta = NaN;
|
9
|
+
/** @private */
|
10
|
+
this._timeout = NaN;
|
11
|
+
/** @type {NodeJS.Timer | null} */
|
12
|
+
this._timeoutHandle = null;
|
13
|
+
/** @type {Deferred | null} */
|
14
|
+
this._timeoutDeferred = null;
|
15
|
+
}
|
16
|
+
|
17
|
+
clear() {
|
18
|
+
if (this._timeoutHandle) {
|
19
|
+
clearTimeout(this._timeoutHandle);
|
20
|
+
this._timeoutHandle = null;
|
21
|
+
}
|
22
|
+
|
23
|
+
this._eta = NaN;
|
24
|
+
this._timeout = NaN;
|
25
|
+
this._timeoutDeferred = null;
|
26
|
+
}
|
27
|
+
|
28
|
+
get expired() {
|
29
|
+
return this._timeoutDeferred ? this._timeoutDeferred.isResolved() : false;
|
30
|
+
}
|
31
|
+
|
7
32
|
/**
|
8
|
-
* @param {string} description - gives more context for thrown errors
|
9
33
|
* @param {number} timeout - maximal allowed duration in milliseconds
|
10
34
|
*/
|
11
|
-
|
12
|
-
|
35
|
+
schedule(timeout) {
|
36
|
+
this.clear();
|
37
|
+
|
38
|
+
this._eta = Date.now() + timeout;
|
13
39
|
this._timeout = timeout;
|
14
|
-
|
15
|
-
this.
|
40
|
+
this._timeoutDeferred = new Deferred();
|
41
|
+
this._timeoutHandle = setTimeout(() => {
|
42
|
+
this._timeoutDeferred.resolve();
|
43
|
+
}, this._timeout);
|
16
44
|
|
17
|
-
this
|
45
|
+
return this;
|
18
46
|
}
|
19
47
|
|
20
|
-
|
21
|
-
this.
|
22
|
-
|
48
|
+
extend(ms) {
|
49
|
+
if (this.expired) {
|
50
|
+
return this.schedule(ms);
|
51
|
+
}
|
52
|
+
|
53
|
+
clearTimeout(this._timeoutHandle);
|
54
|
+
this._eta += ms;
|
55
|
+
this._timeout += ms;
|
23
56
|
this._timeoutHandle = setTimeout(() => {
|
24
57
|
this._timeoutDeferred.resolve();
|
25
|
-
}, this.
|
58
|
+
}, this._eta - Date.now());
|
26
59
|
}
|
27
60
|
|
28
|
-
async run(action) {
|
61
|
+
async run(description, action) {
|
62
|
+
if (!this._timeoutDeferred) {
|
63
|
+
throw new DetoxInternalError('Cannot run a timer action from an uninitialized timer');
|
64
|
+
}
|
65
|
+
|
29
66
|
const error = new DetoxRuntimeError({
|
30
|
-
message: `Exceeded timeout of ${this._timeout}ms while ${
|
67
|
+
message: `Exceeded timeout of ${this._timeout}ms while ${description}`,
|
31
68
|
noStack: true,
|
32
69
|
});
|
33
70
|
|
71
|
+
if (this.expired) {
|
72
|
+
throw error;
|
73
|
+
}
|
74
|
+
|
34
75
|
return Promise.race([
|
35
76
|
this._timeoutDeferred.promise.then(() => { throw error; }),
|
36
77
|
Promise.resolve().then(action),
|
37
78
|
]);
|
38
79
|
}
|
39
|
-
|
40
|
-
dispose() {
|
41
|
-
clearTimeout(this._timeoutHandle);
|
42
|
-
}
|
43
|
-
|
44
|
-
reset(extraDelayMs) {
|
45
|
-
this._timeout = extraDelayMs;
|
46
|
-
|
47
|
-
if (this._timeoutDeferred.status !== Deferred.PENDING) {
|
48
|
-
this._schedule();
|
49
|
-
} else {
|
50
|
-
clearTimeout(this._timeoutHandle);
|
51
|
-
this._timeoutHandle = setTimeout(() => this._timeoutDeferred.resolve(), extraDelayMs);
|
52
|
-
}
|
53
|
-
}
|
54
|
-
|
55
|
-
static async run({ description, timeout, fn }) {
|
56
|
-
const timer = new Timer({ description, timeout });
|
57
|
-
try {
|
58
|
-
await timer.run(fn);
|
59
|
-
} finally {
|
60
|
-
timer.dispose();
|
61
|
-
}
|
62
|
-
}
|
63
80
|
}
|
64
81
|
|
65
82
|
module.exports = Timer;
|
package/src/utils/argparse.js
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
const path = require('path');
|
2
|
+
|
1
3
|
const _ = require('lodash');
|
2
4
|
const argv = require('minimist')(process.argv.slice(2));
|
3
5
|
|
@@ -81,9 +83,18 @@ function joinArgs(keyValues, options = DEFAULT_JOIN_ARGUMENTS_OPTIONS) {
|
|
81
83
|
return argArray.join(' ');
|
82
84
|
}
|
83
85
|
|
86
|
+
function getCurrentCommand() {
|
87
|
+
const cwd = process.cwd();
|
88
|
+
|
89
|
+
return process.argv.slice(1).map((value, index) => {
|
90
|
+
return index ? value : path.relative(cwd, value);
|
91
|
+
}).join(' ');
|
92
|
+
}
|
93
|
+
|
84
94
|
module.exports = {
|
85
95
|
getArgValue,
|
86
96
|
getEnvValue,
|
87
97
|
getFlag,
|
88
98
|
joinArgs,
|
99
|
+
getCurrentCommand,
|
89
100
|
};
|
@@ -3,7 +3,7 @@ const { exec } = require('child-process-promise');
|
|
3
3
|
const _ = require('lodash');
|
4
4
|
|
5
5
|
const DetoxRuntimeError = require('../../errors/DetoxRuntimeError');
|
6
|
-
const rootLogger = require('../logger').child({
|
6
|
+
const rootLogger = require('../logger').child({ cat: ['child-process', 'child-process-exec'] });
|
7
7
|
const retry = require('../retry');
|
8
8
|
|
9
9
|
const execsCounter = require('./opsCounter');
|
@@ -2,7 +2,7 @@
|
|
2
2
|
const { spawn } = require('child-process-promise');
|
3
3
|
const _ = require('lodash');
|
4
4
|
|
5
|
-
const rootLogger = require('../logger').child({
|
5
|
+
const rootLogger = require('../logger').child({ cat: ['child-process', 'child-process-spawn'] });
|
6
6
|
const { escape } = require('../pipeCommands');
|
7
7
|
const retry = require('../retry');
|
8
8
|
|
package/src/utils/errorUtils.js
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
const { isError } = require('lodash');
|
2
|
+
const { deserializeError, serializeError } = require('serialize-error');
|
3
|
+
|
2
4
|
const CLEAN_AT = /\n\s*at [\s\S]*/m;
|
3
5
|
|
4
6
|
function filterErrorStack(error, predicate) {
|
@@ -16,11 +18,12 @@ function filterErrorStack(error, predicate) {
|
|
16
18
|
}
|
17
19
|
|
18
20
|
function replaceErrorStack(source, target) {
|
19
|
-
const sourceStack = source.stack ||
|
20
|
-
const targetStack = target.stack || target.message;
|
21
|
+
const sourceStack = (source.stack || '');
|
21
22
|
const sourceMessage = sourceStack.replace(CLEAN_AT, '');
|
22
|
-
const targetMessage = targetStack.replace(CLEAN_AT, '');
|
23
23
|
const actualSourceStack = sourceStack.slice(sourceMessage.length);
|
24
|
+
|
25
|
+
const targetMessage = target.message || target.stack.replace(CLEAN_AT, '');
|
26
|
+
|
24
27
|
target.stack = targetMessage + actualSourceStack;
|
25
28
|
return target;
|
26
29
|
}
|
@@ -37,9 +40,27 @@ function asError(error) {
|
|
37
40
|
return isError(error) ? error : new Error(error);
|
38
41
|
}
|
39
42
|
|
43
|
+
function serializeObjectWithError(obj, errorKey) {
|
44
|
+
if (obj[errorKey]) {
|
45
|
+
return { ...obj, [errorKey]: serializeError(obj[errorKey]) };
|
46
|
+
}
|
47
|
+
|
48
|
+
return obj;
|
49
|
+
}
|
50
|
+
|
51
|
+
function deserializeObjectWithError(obj, errorKey) {
|
52
|
+
if (typeof obj[errorKey] === 'object' && !(obj[errorKey] instanceof Error)) {
|
53
|
+
return { ...obj, [errorKey]: deserializeError(obj[errorKey]) };
|
54
|
+
}
|
55
|
+
|
56
|
+
return obj;
|
57
|
+
}
|
58
|
+
|
40
59
|
module.exports = {
|
41
60
|
asError,
|
42
61
|
replaceErrorStack,
|
43
62
|
filterErrorStack,
|
44
63
|
createErrorWithUserStack,
|
64
|
+
serializeObjectWithError,
|
65
|
+
deserializeObjectWithError,
|
45
66
|
};
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module.exports = {
|
2
|
+
actionDescription: {
|
3
|
+
adjustSliderToPosition: (newPosition) => `adjust slider to position ${newPosition}`,
|
4
|
+
clearText: () => 'clear input text',
|
5
|
+
getAttributes: () => 'get element attributes',
|
6
|
+
longPress: (duration) => `long press${duration !== undefined ? ` for ${duration}ms` : ''}`,
|
7
|
+
longPressAndDrag: (duration, startX, startY, targetElement, endX, endY, speed, holdDuration) =>
|
8
|
+
`long press and drag from ${startX}, ${startY} to ${endX}, ${endY} with speed ${speed} and hold duration ${holdDuration}`,
|
9
|
+
multiTap: (times) => `tap ${times} times`,
|
10
|
+
pinch: (scale, speed, angle) => `pinch with scale ${scale}, speed ${speed}, and angle ${angle}`,
|
11
|
+
pinchWithAngle: (direction, speed, angle) => `pinch with direction ${direction}, speed ${speed}, and angle ${angle}`,
|
12
|
+
replaceText: (value) => `replace input text: "${value}"`,
|
13
|
+
scroll: (amount, direction, startPositionX, startPositionY) =>
|
14
|
+
`scroll ${amount} pixels ${direction}${startPositionX !== undefined && startPositionY !== undefined ? ` from normalized position (${startPositionX}, ${startPositionY})` : ''}`,
|
15
|
+
scrollTo: (edge) => `scroll to ${edge}`,
|
16
|
+
scrollToIndex: (index) => `scroll to index #${index}`,
|
17
|
+
setColumnToValue: (column, value) => `set column ${column} to value ${value}`,
|
18
|
+
setDatePickerDate: (dateString, dateFormat) => `set date picker date to ${dateString} using format ${dateFormat}`,
|
19
|
+
swipe: (direction, speed, normalizedSwipeOffset, normalizedStartingPointX, normalizedStartingPointY) =>
|
20
|
+
`swipe ${direction} ${speed} with offset ${normalizedSwipeOffset}
|
21
|
+
${!isNaN(normalizedStartingPointX) && !isNaN(normalizedStartingPointY) ? ` from normalized position (${normalizedStartingPointX}, ${normalizedStartingPointY})` : ''}`,
|
22
|
+
takeScreenshot: (screenshotName) => `take screenshot${screenshotName !== undefined ? ` with name "${screenshotName}"` : ''}`,
|
23
|
+
tapAtPoint: (value) => `tap${value !== undefined ? ` at ${JSON.stringify(value)}` : ''}`,
|
24
|
+
tapBackspaceKey: () => 'tap on backspace key',
|
25
|
+
tapReturnKey: () => 'tap on return key',
|
26
|
+
typeText: (value) => `type input text: "${value}"`,
|
27
|
+
},
|
28
|
+
expectDescription: {
|
29
|
+
waitFor: (actionDescription) => `wait for expectation while ${actionDescription}`,
|
30
|
+
waitForWithTimeout: (expectDescription, timeout) => `${expectDescription} with timeout (${timeout} ms)`,
|
31
|
+
withTimeout: (timeout) => `wait until timeout (${timeout} ms)`,
|
32
|
+
toBeFocused: () => 'to be focused',
|
33
|
+
toBeVisible: (percent) => `to be visible${percent !== undefined ? ` ${percent}%` : ''}`,
|
34
|
+
toExist: () => 'to exist',
|
35
|
+
toHaveText: (text) => `to have text: "${text}"`,
|
36
|
+
toHaveLabel: (label) => `to have label: "${label}"`,
|
37
|
+
toHaveId: (id) => `to have id: "${id}"`,
|
38
|
+
toHaveValue: (value) => `to have value: "${value}"`,
|
39
|
+
toHaveSliderPosition: (position, tolerance) => `to have slider position: ${position}${tolerance > 0 ? ` with tolerance ${tolerance}` : ''}`,
|
40
|
+
toHaveToggleValue: (value) => `to have toggle value: ${value}`,
|
41
|
+
full: (expectDescription, notCondition) => `expect element ${notCondition ? `not ${expectDescription}` : expectDescription}`
|
42
|
+
}
|
43
|
+
};
|
package/src/utils/logger.js
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
function _getCallStackTrace() {
|
2
|
+
return new Error().stack
|
3
|
+
.split('\n')
|
4
|
+
.slice(1) // Ignore Error message
|
5
|
+
.map(line => line
|
6
|
+
.replace(/^\s*at\s+/, '')
|
7
|
+
.replace(process.cwd(), '')
|
8
|
+
)
|
9
|
+
.filter(line => !line.includes('/detox/src')) // Ignore detox internal calls
|
10
|
+
.join('\n');
|
11
|
+
}
|
12
|
+
|
13
|
+
function invocationCall(logger, sectionName, invocation, action) {
|
14
|
+
return logger.trace.complete({
|
15
|
+
cat: 'ws-client,ws-client-invocation',
|
16
|
+
data: invocation,
|
17
|
+
stack: _getCallStackTrace(),
|
18
|
+
}, sectionName, action);
|
19
|
+
}
|
20
|
+
|
21
|
+
module.exports = invocationCall;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
function traceMethods(logger, obj, methodNames) {
|
2
|
+
for (const name of methodNames) {
|
3
|
+
const originalMethod = obj[name];
|
4
|
+
|
5
|
+
obj[name] = function tracedMethod(...args) {
|
6
|
+
return logger.trace.complete(
|
7
|
+
{ args },
|
8
|
+
name,
|
9
|
+
originalMethod.apply.bind(originalMethod, obj, args)
|
10
|
+
);
|
11
|
+
};
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
module.exports = traceMethods;
|
@@ -1 +0,0 @@
|
|
1
|
-
937f993292c31bbc63081e5948da3f98
|
@@ -1 +0,0 @@
|
|
1
|
-
1241bd41fd22394ae5188a93cbfc937e3d7e1a7f
|
@@ -1 +0,0 @@
|
|
1
|
-
cea1094d1b55bc0da25e7d50cb0ab6c46054e43bd7466923c9ec3306675d5bba
|
@@ -1 +0,0 @@
|
|
1
|
-
76e5f493a41f718bff430572aa2215675e5767827dc44f6f44dda78d64768e124c9b2078d4b1669537fa00e3f34b045eadc22168fb210cab2fbc976470431913
|
@@ -1 +0,0 @@
|
|
1
|
-
b9a7e18eb5db9c29387800d177dc855e
|
@@ -1 +0,0 @@
|
|
1
|
-
e315ec89f403a1b0c2261c72bb6a614752aea946
|
@@ -1 +0,0 @@
|
|
1
|
-
081bddb05b360d8ff578b2dafa006f38bf2e52dd7e0cd7b942764a4ecf391e86
|
@@ -1 +0,0 @@
|
|
1
|
-
616c8bf9cecb7f03331a785c32f1449672e8179c849e997e5ef9ab210d25a95e16efc618c1660757dc0da90b1e09fc90df6cf1e68a0f92a6c33f331f02d74ba2
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
e7043eb4fd0dfa3c309fd8cd35ee68e5
|
@@ -1 +0,0 @@
|
|
1
|
-
80bef0c22a710dabb0e72b8d15c59125db1bd58b
|
@@ -1 +0,0 @@
|
|
1
|
-
7828ffdff493f8a856efad9b7db540e4e6b13b91260292efe98791013ba2db04
|
@@ -1 +0,0 @@
|
|
1
|
-
a57448b5eec5edfb2b45b99b9c8a6714b3384f71ade0f25da7b453d14c29597e818690b293cefa9be9362be29efb2c420664283cb1fc994883cd143d46506a2f
|
@@ -1 +0,0 @@
|
|
1
|
-
409fa95566cf0ec6633fce554ae87b8b
|
@@ -1 +0,0 @@
|
|
1
|
-
8086a11b6780db7eb68ab43d29e7680b01e72479
|
@@ -1 +0,0 @@
|
|
1
|
-
4a844b7f2bf2ff0c50a742633c34e8e477e45bae50a2a0126ca2ebdbfd6ee213
|
@@ -1 +0,0 @@
|
|
1
|
-
22ccfbb1ddd925f4892bed13b9bbb5061f20a022155d0c8d79bc78c993e1d3f326c67560d92f25223d9de30d7e0432af4f09ed35db9f36282bf2b790c6d215fb
|
@@ -1,84 +0,0 @@
|
|
1
|
-
@file:RNDropSupportTodo(62, "Remove all of this; Use DelegatedIdleInterrogationStrategy, instead.")
|
2
|
-
|
3
|
-
package com.wix.detox.reactnative.idlingresources.timers
|
4
|
-
|
5
|
-
import com.facebook.react.bridge.ReactContext
|
6
|
-
import com.wix.detox.common.RNDropSupportTodo
|
7
|
-
import com.wix.detox.reactnative.helpers.RNHelpers
|
8
|
-
import org.joor.Reflect
|
9
|
-
import java.util.*
|
10
|
-
|
11
|
-
private const val BUSY_WINDOW_THRESHOLD = 1500
|
12
|
-
|
13
|
-
private class TimerReflected(timer: Any) {
|
14
|
-
private var reflected = Reflect.on(timer)
|
15
|
-
|
16
|
-
val isRepeating: Boolean
|
17
|
-
get() = reflected.field("mRepeat").get()
|
18
|
-
val interval: Int
|
19
|
-
get() = reflected.field("mInterval").get()
|
20
|
-
val targetTime: Long
|
21
|
-
get() = reflected.field("mTargetTime").get()
|
22
|
-
}
|
23
|
-
|
24
|
-
private class TimingModuleReflected(private val timingModule: Any) {
|
25
|
-
val timersQueue: PriorityQueue<Any>
|
26
|
-
get() = Reflect.on(timingModule).field("mTimers").get()
|
27
|
-
val timersLock: Any
|
28
|
-
get() = Reflect.on(timingModule).field("mTimerGuard").get()
|
29
|
-
|
30
|
-
operator fun component1() = timersQueue
|
31
|
-
operator fun component2() = timersLock
|
32
|
-
}
|
33
|
-
|
34
|
-
class DefaultIdleInterrogationStrategy
|
35
|
-
internal constructor(private val timersModule: Any)
|
36
|
-
: IdleInterrogationStrategy {
|
37
|
-
|
38
|
-
override fun isIdleNow(): Boolean {
|
39
|
-
val (timersQueue, timersLock) = TimingModuleReflected(timersModule)
|
40
|
-
synchronized(timersLock) {
|
41
|
-
val nextTimer = timersQueue.peek()
|
42
|
-
nextTimer?.let {
|
43
|
-
return !isTimerInBusyWindow(it) && !hasBusyTimers(timersQueue)
|
44
|
-
}
|
45
|
-
return true
|
46
|
-
}
|
47
|
-
}
|
48
|
-
|
49
|
-
private fun isTimerInBusyWindow(timer: Any): Boolean {
|
50
|
-
val timerReflected = TimerReflected(timer)
|
51
|
-
return when {
|
52
|
-
timerReflected.isRepeating -> false
|
53
|
-
timerReflected.interval > BUSY_WINDOW_THRESHOLD -> false
|
54
|
-
else -> true
|
55
|
-
}
|
56
|
-
}
|
57
|
-
|
58
|
-
private fun hasBusyTimers(timersQueue: PriorityQueue<Any>): Boolean {
|
59
|
-
timersQueue.forEach {
|
60
|
-
if (isTimerInBusyWindow(it)) {
|
61
|
-
return true
|
62
|
-
}
|
63
|
-
}
|
64
|
-
return false
|
65
|
-
}
|
66
|
-
|
67
|
-
companion object {
|
68
|
-
fun createIfSupported(reactContext: ReactContext): DefaultIdleInterrogationStrategy? {
|
69
|
-
// RN = 0.62.0:
|
70
|
-
// Should have been handled by DelegatedIdleInterrogationStrategy.createIfSupported() but seems the new TimingModule class
|
71
|
-
// was released without the awaited-for "hasActiveTimersInRange()" method.
|
72
|
-
try {
|
73
|
-
val timingModule = RNHelpers.getNativeModule(reactContext, "com.facebook.react.modules.core.TimingModule")
|
74
|
-
val timersManager = Reflect.on(timingModule).get<Any>("mJavaTimerManager")
|
75
|
-
return DefaultIdleInterrogationStrategy(timersManager)
|
76
|
-
} catch (ex: Exception) {
|
77
|
-
}
|
78
|
-
|
79
|
-
// RN < 0.62
|
80
|
-
val timingModule = RNHelpers.getNativeModule(reactContext, "com.facebook.react.modules.core.Timing") ?: return null
|
81
|
-
return DefaultIdleInterrogationStrategy(timingModule)
|
82
|
-
}
|
83
|
-
}
|
84
|
-
}
|
@@ -1,115 +0,0 @@
|
|
1
|
-
package com.wix.detox.reactnative.idlingresources.timers
|
2
|
-
|
3
|
-
import com.facebook.react.bridge.NativeModule
|
4
|
-
import com.wix.detox.UTHelpers
|
5
|
-
import org.assertj.core.api.Assertions
|
6
|
-
import org.spekframework.spek2.Spek
|
7
|
-
import org.spekframework.spek2.style.specification.describe
|
8
|
-
import java.util.*
|
9
|
-
import java.util.concurrent.Executors
|
10
|
-
|
11
|
-
private const val BUSY_INTERVAL_MS = 1500
|
12
|
-
private const val MEANINGFUL_TIMER_INTERVAL = BUSY_INTERVAL_MS
|
13
|
-
|
14
|
-
data class TimerStub(
|
15
|
-
private var mCallbackID: Int,
|
16
|
-
private var mTargetTime: Long,
|
17
|
-
private var mInterval: Int,
|
18
|
-
private var mRepeat: Boolean)
|
19
|
-
|
20
|
-
class TimersNativeModuleStub : NativeModule {
|
21
|
-
val mTimers: PriorityQueue<Any> = PriorityQueue(2) { _, _ -> 0}
|
22
|
-
val mTimerGuard = "Lock-Mock"
|
23
|
-
|
24
|
-
override fun onCatalystInstanceDestroy() {}
|
25
|
-
override fun invalidate() {}
|
26
|
-
|
27
|
-
override fun getName(): String = "TimersNativeModuleStub"
|
28
|
-
override fun canOverrideExistingModule() = false
|
29
|
-
override fun initialize() {}
|
30
|
-
}
|
31
|
-
|
32
|
-
private fun now() = System.nanoTime() / 1000000L
|
33
|
-
private fun aTimer(targetTime: Long, interval: Int, isRepeating: Boolean): TimerStub {
|
34
|
-
return TimerStub(-1, targetTime, interval, isRepeating)
|
35
|
-
}
|
36
|
-
private fun aTimer(interval: Int, isRepeating: Boolean) = aTimer(now() + interval + 10, interval, isRepeating)
|
37
|
-
private fun aOneShotTimer(interval: Int) = aTimer(interval, false)
|
38
|
-
private fun aRepeatingTimer(interval: Int) = aTimer(interval, true)
|
39
|
-
private fun anOverdueTimer() = aTimer(now() - 100, 123, false)
|
40
|
-
|
41
|
-
object DefaultIdleInterrogationStrategySpec: Spek({
|
42
|
-
describe("Default timers idle-interrogation strategy") {
|
43
|
-
|
44
|
-
lateinit var timersNativeModule: TimersNativeModuleStub
|
45
|
-
|
46
|
-
beforeEachTest {
|
47
|
-
timersNativeModule = TimersNativeModuleStub()
|
48
|
-
}
|
49
|
-
|
50
|
-
fun givenTimer(timer: Any) {
|
51
|
-
timersNativeModule.mTimers.add(timer)
|
52
|
-
}
|
53
|
-
|
54
|
-
fun uut() = DefaultIdleInterrogationStrategy(timersNativeModule)
|
55
|
-
|
56
|
-
it("should be idle if there are no timers in queue") {
|
57
|
-
Assertions.assertThat(uut().isIdleNow()).isTrue()
|
58
|
-
}
|
59
|
-
|
60
|
-
it("should be busy if there's a meaningful pending timer") {
|
61
|
-
givenTimer(aOneShotTimer(MEANINGFUL_TIMER_INTERVAL))
|
62
|
-
Assertions.assertThat(uut().isIdleNow()).isFalse()
|
63
|
-
}
|
64
|
-
|
65
|
-
it("should be idle if pending timer is too far away (ie not meaningful)") {
|
66
|
-
givenTimer(aOneShotTimer(BUSY_INTERVAL_MS + 1))
|
67
|
-
Assertions.assertThat(uut().isIdleNow()).isTrue()
|
68
|
-
}
|
69
|
-
|
70
|
-
it("should be idle if the only timer is a repeating one") {
|
71
|
-
givenTimer(aRepeatingTimer(MEANINGFUL_TIMER_INTERVAL))
|
72
|
-
Assertions.assertThat(uut().isIdleNow()).isTrue()
|
73
|
-
}
|
74
|
-
|
75
|
-
it("should be busy if a meaningful pending timer lies beyond a repeating one") {
|
76
|
-
givenTimer(aRepeatingTimer(BUSY_INTERVAL_MS / 10))
|
77
|
-
givenTimer(aOneShotTimer(BUSY_INTERVAL_MS))
|
78
|
-
Assertions.assertThat(uut().isIdleNow()).isFalse()
|
79
|
-
}
|
80
|
-
|
81
|
-
/**
|
82
|
-
* Note: Reversed logic due to this issue: https://github.com/wix/Detox/issues/1171 !!!
|
83
|
-
*
|
84
|
-
* Apparently at times (rare) this caused Espresso to think we're idle too soon, rendering
|
85
|
-
* it never to query any idling resource again even after the timer effectively expires...
|
86
|
-
*/
|
87
|
-
it("should be *busy* even if all timers are overdue") {
|
88
|
-
givenTimer(anOverdueTimer())
|
89
|
-
givenTimer(anOverdueTimer())
|
90
|
-
Assertions.assertThat(uut().isIdleNow()).isFalse()
|
91
|
-
}
|
92
|
-
|
93
|
-
it("should be busy if has a meaningful pending timer set beyond an overdue timer") {
|
94
|
-
givenTimer(anOverdueTimer())
|
95
|
-
givenTimer(aOneShotTimer(MEANINGFUL_TIMER_INTERVAL))
|
96
|
-
Assertions.assertThat(uut().isIdleNow()).isFalse()
|
97
|
-
}
|
98
|
-
|
99
|
-
it("should yield to other threads using the timers module") {
|
100
|
-
val executor = Executors.newSingleThreadExecutor()
|
101
|
-
var isIdle: Boolean? = null
|
102
|
-
|
103
|
-
synchronized(timersNativeModule.mTimerGuard) {
|
104
|
-
executor.submit {
|
105
|
-
isIdle = uut().isIdleNow()
|
106
|
-
}
|
107
|
-
UTHelpers.yieldToOtherThreads(executor)
|
108
|
-
Assertions.assertThat(isIdle).isNull()
|
109
|
-
}
|
110
|
-
UTHelpers.yieldToOtherThreads(executor)
|
111
|
-
Assertions.assertThat(isIdle).isNotNull()
|
112
|
-
executor.shutdownNow()
|
113
|
-
}
|
114
|
-
}
|
115
|
-
})
|
@@ -1,25 +0,0 @@
|
|
1
|
-
const chalk = require('chalk');
|
2
|
-
|
3
|
-
// @ts-ignore
|
4
|
-
console.error(chalk.yellow(`
|
5
|
-
========================= THE NEW JOURNEY BEGINS =============================
|
6
|
-
|
7
|
-
https://wix.github.io/Detox/docs/guide/jest
|
8
|
-
|
9
|
-
Sorry to say that Detox 20 comes without old adapters for Jest.
|
10
|
-
You have to rearrange your init code before you can continue your journey.
|
11
|
-
|
12
|
-
Navigate to the link and follow the migration guide steps.
|
13
|
-
|
14
|
-
Sincerely yours,
|
15
|
-
Detox team.
|
16
|
-
|
17
|
-
https://wix.github.io/Detox/docs/guide/jest
|
18
|
-
|
19
|
-
========================= THE NEW JOURNEY BEGINS =============================
|
20
|
-
|
21
|
-
`));
|
22
|
-
|
23
|
-
throw Object.assign(new Error(
|
24
|
-
'\n\nPlease follow the new Jest setup guide:\nhttps://wix.github.io/Detox/docs/guide/jest\n\n'
|
25
|
-
), { stack: '' });
|