detox 20.0.13-prerelease.0 → 20.0.14-next-is-hittable-check-2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. package/Detox-android/com/wix/detox/{20.0.13-prerelease.0/detox-20.0.13-prerelease.0-javadoc.jar → 20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0-javadoc.jar} +0 -0
  2. package/Detox-android/com/wix/detox/20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0-javadoc.jar.md5 +1 -0
  3. package/Detox-android/com/wix/detox/20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0-javadoc.jar.sha1 +1 -0
  4. package/Detox-android/com/wix/detox/20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0-javadoc.jar.sha256 +1 -0
  5. package/Detox-android/com/wix/detox/20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0-javadoc.jar.sha512 +1 -0
  6. package/Detox-android/com/wix/detox/{20.0.13-prerelease.0/detox-20.0.13-prerelease.0-sources.jar → 20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0-sources.jar} +0 -0
  7. package/Detox-android/com/wix/detox/20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0-sources.jar.md5 +1 -0
  8. package/Detox-android/com/wix/detox/20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0-sources.jar.sha1 +1 -0
  9. package/Detox-android/com/wix/detox/20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0-sources.jar.sha256 +1 -0
  10. package/Detox-android/com/wix/detox/20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0-sources.jar.sha512 +1 -0
  11. package/Detox-android/com/wix/detox/{20.0.13-prerelease.0/detox-20.0.13-prerelease.0.aar → 20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0.aar} +0 -0
  12. package/Detox-android/com/wix/detox/{20.0.13-prerelease.0/detox-20.0.13-prerelease.0.aar.md5 → 20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0.aar.md5} +0 -0
  13. package/Detox-android/com/wix/detox/{20.0.13-prerelease.0/detox-20.0.13-prerelease.0.aar.sha1 → 20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0.aar.sha1} +0 -0
  14. package/Detox-android/com/wix/detox/{20.0.13-prerelease.0/detox-20.0.13-prerelease.0.aar.sha256 → 20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0.aar.sha256} +0 -0
  15. package/Detox-android/com/wix/detox/{20.0.13-prerelease.0/detox-20.0.13-prerelease.0.aar.sha512 → 20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0.aar.sha512} +0 -0
  16. package/Detox-android/com/wix/detox/{20.0.13-prerelease.0/detox-20.0.13-prerelease.0.pom → 20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0.pom} +1 -1
  17. package/Detox-android/com/wix/detox/20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0.pom.md5 +1 -0
  18. package/Detox-android/com/wix/detox/20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0.pom.sha1 +1 -0
  19. package/Detox-android/com/wix/detox/20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0.pom.sha256 +1 -0
  20. package/Detox-android/com/wix/detox/20.0.14-next-is-hittable-check-2.0/detox-20.0.14-next-is-hittable-check-2.0.pom.sha512 +1 -0
  21. package/Detox-android/com/wix/detox/maven-metadata.xml +4 -4
  22. package/Detox-android/com/wix/detox/maven-metadata.xml.md5 +1 -1
  23. package/Detox-android/com/wix/detox/maven-metadata.xml.sha1 +1 -1
  24. package/Detox-android/com/wix/detox/maven-metadata.xml.sha256 +1 -1
  25. package/Detox-android/com/wix/detox/maven-metadata.xml.sha512 +1 -1
  26. package/Detox-ios-src.tbz +0 -0
  27. package/Detox-ios.tbz +0 -0
  28. package/android/build.gradle +0 -1
  29. package/index.d.ts +98 -11
  30. package/internals.d.ts +8 -4
  31. package/package.json +6 -6
  32. package/src/DetoxWorker.js +11 -3
  33. package/src/realms/DetoxContext.js +2 -0
  34. package/src/realms/DetoxInternalsFacade.js +0 -6
  35. package/src/realms/DetoxPrimaryContext.js +7 -2
  36. package/src/realms/DetoxSecondaryContext.js +6 -2
  37. package/Detox-android/com/wix/detox/20.0.13-prerelease.0/detox-20.0.13-prerelease.0-javadoc.jar.md5 +0 -1
  38. package/Detox-android/com/wix/detox/20.0.13-prerelease.0/detox-20.0.13-prerelease.0-javadoc.jar.sha1 +0 -1
  39. package/Detox-android/com/wix/detox/20.0.13-prerelease.0/detox-20.0.13-prerelease.0-javadoc.jar.sha256 +0 -1
  40. package/Detox-android/com/wix/detox/20.0.13-prerelease.0/detox-20.0.13-prerelease.0-javadoc.jar.sha512 +0 -1
  41. package/Detox-android/com/wix/detox/20.0.13-prerelease.0/detox-20.0.13-prerelease.0-sources.jar.md5 +0 -1
  42. package/Detox-android/com/wix/detox/20.0.13-prerelease.0/detox-20.0.13-prerelease.0-sources.jar.sha1 +0 -1
  43. package/Detox-android/com/wix/detox/20.0.13-prerelease.0/detox-20.0.13-prerelease.0-sources.jar.sha256 +0 -1
  44. package/Detox-android/com/wix/detox/20.0.13-prerelease.0/detox-20.0.13-prerelease.0-sources.jar.sha512 +0 -1
  45. package/Detox-android/com/wix/detox/20.0.13-prerelease.0/detox-20.0.13-prerelease.0.pom.md5 +0 -1
  46. package/Detox-android/com/wix/detox/20.0.13-prerelease.0/detox-20.0.13-prerelease.0.pom.sha1 +0 -1
  47. package/Detox-android/com/wix/detox/20.0.13-prerelease.0/detox-20.0.13-prerelease.0.pom.sha256 +0 -1
  48. package/Detox-android/com/wix/detox/20.0.13-prerelease.0/detox-20.0.13-prerelease.0.pom.sha512 +0 -1
@@ -0,0 +1 @@
1
+ 6bfd20ec1ae900abd578d862751e5ac04ef373cbe27201e7dbb078779340eaa5
@@ -0,0 +1 @@
1
+ f969f49c3ed45ff55bc020e06ed2ce25ec442379d558f6c9a7a1f0345a472a4245cfaad8ceba876e6459920c8fb691eddc7906baf4231ef7838bc49c3822f2cd
@@ -0,0 +1 @@
1
+ 6d018ab8b1a477b086e9cb9daabb86b406a84b908acb5b51aa19e07cf178c4f7
@@ -0,0 +1 @@
1
+ fb025c2b71f43d76d274e2a9c62654f6b3497cdf8ddf4b92318a35508e3383c87a0ed0b9f5e461c7e1a6779962d3a012f23baa9a9f2116525f6c32d8c163882c
@@ -3,7 +3,7 @@
3
3
  <modelVersion>4.0.0</modelVersion>
4
4
  <groupId>com.wix</groupId>
5
5
  <artifactId>detox</artifactId>
6
- <version>20.0.13-prerelease.0</version>
6
+ <version>20.0.14-next-is-hittable-check-2.0</version>
7
7
  <packaging>aar</packaging>
8
8
  <name>Detox</name>
9
9
  <description>Gray box end-to-end testing and automation library for mobile apps</description>
@@ -0,0 +1 @@
1
+ ba3edd4b7874e8e296a34bc55fa4aa1d49a40eb36ce442de000e62e9876e3b2d
@@ -0,0 +1 @@
1
+ 05ee92a5fcff9f5b53bc52ba1d5e3915369d0b34df12f94690f8b87f30ec705d2ba00d52bc79293cbcfecfbdc6773167b544b4973d82fbb4d6ecaed4ee3ae2a5
@@ -3,11 +3,11 @@
3
3
  <groupId>com.wix</groupId>
4
4
  <artifactId>detox</artifactId>
5
5
  <versioning>
6
- <latest>20.0.13-prerelease.0</latest>
7
- <release>20.0.13-prerelease.0</release>
6
+ <latest>20.0.14-next-is-hittable-check-2.0</latest>
7
+ <release>20.0.14-next-is-hittable-check-2.0</release>
8
8
  <versions>
9
- <version>20.0.13-prerelease.0</version>
9
+ <version>20.0.14-next-is-hittable-check-2.0</version>
10
10
  </versions>
11
- <lastUpdated>20221027152922</lastUpdated>
11
+ <lastUpdated>20221102074725</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- ee112aada0b842b84d9d0ce02c34412d
1
+ a1b9fb9ca9d07b3262312c77cbff61fb
@@ -1 +1 @@
1
- 4a588bcf856923db72dcce6afbbd5d3e8deac76a
1
+ e8e44759632af3d4984893f4a28563aea9527f22
@@ -1 +1 @@
1
- 2508b9fd44abf05b74a3a95332f0ad7f91277e421f07301e69774ca9ab2addb8
1
+ ae7d117aa6790de1a9487a514d0cf8244edb3885b266cc06030c77f14feb86ff
@@ -1 +1 @@
1
- e99c975ec5eb3d44859e1b3730703240e4aafc46dd57adb66ea43667c2f16d4c57311ea041e605a68816353074b852dc9572513a66cbadf2963d2247fd3c5cd3
1
+ d256253b0492f63eda88eebb21a54e0ee3d73ab7420ff1db8e766ef09f49d8c854e4054358a0ad0d539380faa918ac0334405977c1e73126f00f6e939e4cb9da
package/Detox-ios-src.tbz CHANGED
Binary file
package/Detox-ios.tbz CHANGED
Binary file
@@ -37,7 +37,6 @@ allprojects {
37
37
  mavenLocal()
38
38
  mavenCentral()
39
39
  google()
40
- jcenter()
41
40
  maven {
42
41
  url "$projectDir/../../node_modules/react-native/android"
43
42
  }
package/index.d.ts CHANGED
@@ -32,7 +32,7 @@ declare global {
32
32
  }
33
33
 
34
34
  namespace Detox {
35
- // region DetoxConfig
35
+ //#region DetoxConfig
36
36
 
37
37
  interface DetoxConfig extends DetoxConfigurationCommon {
38
38
  /**
@@ -88,9 +88,13 @@ declare global {
88
88
  */
89
89
  reinstallApp?: boolean;
90
90
  /**
91
- * If you wish to run multiple "detox test" commands in parallel,
92
- * make sure they don't delete the shared lock file only the
93
- * first command should reset the lock file.
91
+ * When false, `detox test` command always deletes the shared lock file on start,
92
+ * assuming it had been left from the previous, already finished test session.
93
+ * The lock file contains information about busy and free devices and ensures
94
+ * no device can be used simultaneously by multiple test workers.
95
+ *
96
+ * Setting it to **true** might be useful when if you need to run multiple
97
+ * `detox test` commands in parallel, e.g. test a few configurations at once.
94
98
  *
95
99
  * @default false
96
100
  */
@@ -102,13 +106,43 @@ declare global {
102
106
  };
103
107
  }
104
108
 
109
+ type _DetoxLoggerOptions = Omit<BunyanDebugStreamOptions, 'out'>;
110
+
105
111
  interface DetoxLoggerConfig {
112
+ /**
113
+ * Log level filters the messages printed to your terminal,
114
+ * and it does not affect the logs written to the artifacts.
115
+ *
116
+ * Use `info` by default.
117
+ * Use `error` or warn when you want to make the output as silent as possible.
118
+ * Use `debug` to control what generally is happening under the hood.
119
+ * Use `trace` when troubleshooting specific issues.
120
+ *
121
+ * @default 'info'
122
+ */
106
123
  level?: DetoxLogLevel;
107
124
  /**
125
+ * When enabled, hijacks all the console methods (console.log, console.warn, etc)
126
+ * so that the messages printed via them are formatted and saved as Detox logs.
127
+ *
108
128
  * @default true
109
129
  */
110
130
  overrideConsole?: boolean;
111
- options?: BunyanDebugStreamOptions | ((config: Partial<DetoxLoggerConfig>) => BunyanDebugStreamOptions);
131
+ /**
132
+ * Since Detox is using
133
+ * {@link https://www.npmjs.com/package/bunyan-debug-stream bunyan-debug-stream}
134
+ * for printing logs, all its options are exposed for sake of simplicity
135
+ * of customization.
136
+ *
137
+ * The only exception is {@link BunyanDebugStreamOptions#out} option,
138
+ * which is always set to `process.stdout`.
139
+ *
140
+ * You can also pass a callback function to override the logger config
141
+ * programmatically, e.g. depending on the selected log level.
142
+ *
143
+ * @see {@link BunyanDebugStreamOptions}
144
+ */
145
+ options?: _DetoxLoggerOptions | ((config: Partial<DetoxLoggerConfig>) => _DetoxLoggerOptions);
112
146
  }
113
147
 
114
148
  interface DetoxSessionConfig {
@@ -133,25 +167,78 @@ declare global {
133
167
  */
134
168
  [prop: string]: unknown;
135
169
  };
170
+
136
171
  /**
137
- * Configuration of custom integration features
138
- * between Detox and Jest
172
+ * This is an add-on section used by our Jest integration code (but not Detox core itself).
173
+ * In other words, if you’re implementing (or using) a custom integration with some other test runner, feel free to define a section for yourself (e.g. `testRunner.mocha`)
139
174
  */
140
175
  jest?: {
141
176
  /**
142
177
  * Environment setup timeout
178
+ *
179
+ * As a part of the environment setup, Detox boots the device and installs the apps.
180
+ * If that takes longer than the specified value, the entire test suite will be considered as failed, e.g.:
181
+ * ```plain text
182
+ * FAIL e2e/starter.test.js
183
+ * ● Test suite failed to run
184
+ *
185
+ * Exceeded timeout of 300000ms while setting up Detox environment
186
+ * ```
187
+ *
188
+ * The default value is 5 minutes.
189
+ *
190
+ * @default 300000
191
+ * @see {@link https://jestjs.io/docs/configuration/#testenvironment-string}
143
192
  */
144
193
  setupTimeout?: number | undefined;
145
194
  /**
146
- * Environment teardown timeout
195
+ * Environemnt teardown timeout
196
+ *
197
+ * If the environment teardown takes longer than the specified value, Detox will throw a timeout error.
198
+ * The default value is half a minute.
199
+ *
200
+ * @default 30000 (30 seconds)
201
+ * @see {@link https://jestjs.io/docs/configuration/#testenvironment-string}
147
202
  */
148
203
  teardownTimeout?: number | undefined;
149
204
  /**
150
- * Insist on CLI-based retry mechanism even when the failed tests have been handled
151
- * by jest.retryTimes(n) mechanism from Jest Circus.
205
+ * Jest provides an API to re-run individual failed tests: `jest.retryTimes(count)`.
206
+ * When Detox detects the use of this API, it suppresses its own CLI retry mechanism controlled via `detox test … --retries <N>` or {@link DetoxTestRunnerConfig#retries}.
207
+ * The motivation is simple – activating the both mechanisms is apt to increase your test duration dramatically, if your tests are flaky.
208
+ * If you wish nevertheless to use both the mechanisms simultaneously, set it to `true`.
209
+ *
210
+ * @default false
211
+ * @see {@link https://jestjs.io/docs/29.0/jest-object#jestretrytimesnumretries-options}
152
212
  */
153
213
  retryAfterCircusRetries?: boolean;
214
+ /**
215
+ * By default, Jest prints the test names and their status (_passed_ or _failed_) at the very end of the test session.
216
+ * When enabled, it makes Detox to print messages like these each time the new test starts and ends:
217
+ * ```plain text
218
+ * 18:03:36.258 detox[40125] i Sanity: should have welcome screen
219
+ * 18:03:37.495 detox[40125] i Sanity: should have welcome screen [OK]
220
+ * 18:03:37.496 detox[40125] i Sanity: should show hello screen after tap
221
+ * 18:03:38.928 detox[40125] i Sanity: should show hello screen after tap [OK]
222
+ * 18:03:38.929 detox[40125] i Sanity: should show world screen after tap
223
+ * 18:03:40.351 detox[40125] i Sanity: should show world screen after tap [OK]
224
+ * ```
225
+ * By default, it is enabled automatically in test sessions with a single worker.
226
+ * And vice versa, if multiple tests are executed concurrently, Detox turns it off to avoid confusion in the log.
227
+ * Use boolean values, `true` or `false`, to turn off the automatic choice.
228
+ *
229
+ * @default undefined
230
+ */
154
231
  reportSpecs?: boolean | undefined;
232
+ /**
233
+ * In the environment setup phase, Detox boots the device and installs the apps.
234
+ * This flag tells Detox to print messages like these every time the device gets assigned to a specific suite:
235
+ *
236
+ * ```plain text
237
+ * 18:03:29.869 detox[40125] i starter.test.js is assigned to 4EC84833-C7EA-4CA3-A6E9-5C30A29EA596 (iPhone 12 Pro Max)
238
+ * ```
239
+ *
240
+ * @default true
241
+ */
155
242
  reportWorkerAssign?: boolean | undefined;
156
243
  };
157
244
  /**
@@ -342,7 +429,7 @@ declare global {
342
429
 
343
430
  type DetoxAliasedApp = string | DetoxAppConfig;
344
431
 
345
- // endregion DetoxConfig
432
+ //#endregion
346
433
 
347
434
  interface DetoxExportWrapper {
348
435
  readonly device: Device;
package/internals.d.ts CHANGED
@@ -6,7 +6,7 @@ declare global {
6
6
  type DetoxStatus = 'inactive' | 'init' | 'active' | 'cleanup';
7
7
 
8
8
  type Facade = {
9
- // region Initialization
9
+ //#region Initialization
10
10
  /**
11
11
  * Use with a caution, when you still have no config, yet need to avoid {@link Facade#init}
12
12
  */
@@ -37,9 +37,9 @@ declare global {
37
37
  * This is the phase where the Detox server shuts down.
38
38
  */
39
39
  cleanup(): Promise<void>;
40
- // endregion
40
+ //#endregion
41
41
 
42
- // region Lifecycle
42
+ //#region Lifecycle
43
43
  /**
44
44
  * Reports that the test runner started executing a test suite, e.g. a `beforeAll` hook or a first test.
45
45
  */
@@ -114,7 +114,7 @@ declare global {
114
114
  * @param testResults - reports about test files
115
115
  */
116
116
  reportTestResults(testResults: DetoxTestFileReport[]): Promise<void>;
117
- // endregion
117
+ //#endregion
118
118
 
119
119
  readonly config: RuntimeConfig;
120
120
  readonly log: Detox.Logger;
@@ -131,6 +131,10 @@ declare global {
131
131
  createEventStream(): NodeJS.ReadableStream;
132
132
  };
133
133
 
134
+ /**
135
+ * Not documented on purpose.
136
+ * Provides direct access to the object which holds the device driver, websocket client, matchers, expectations, etc.
137
+ */
134
138
  readonly worker: Worker;
135
139
  }
136
140
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "detox",
3
3
  "description": "E2E tests and automation for mobile",
4
- "version": "20.0.13-prerelease.0",
4
+ "version": "20.0.14-next-is-hittable-check-2.0",
5
5
  "bin": {
6
6
  "detox": "local-cli/cli.js"
7
7
  },
@@ -35,8 +35,8 @@
35
35
  "@types/bunyan": "^1.8.8",
36
36
  "@types/child-process-promise": "^2.2.1",
37
37
  "@types/fs-extra": "^9.0.13",
38
- "@types/jest": "^27.0.3",
39
- "@types/node": "^12.20.37",
38
+ "@types/jest": "^28.1.8",
39
+ "@types/node": "^14.18.33",
40
40
  "@types/node-ipc": "^9.2.0",
41
41
  "@types/ws": "^7.4.0",
42
42
  "@typescript-eslint/eslint-plugin": "^5.4.0",
@@ -46,7 +46,7 @@
46
46
  "eslint-plugin-no-only-tests": "^2.6.0",
47
47
  "eslint-plugin-node": "^11.1.0",
48
48
  "eslint-plugin-unicorn": "^39.0.0",
49
- "jest": "^28.0.0",
49
+ "jest": "^28.1.3",
50
50
  "mockdate": "^2.0.1",
51
51
  "prettier": "1.7.0",
52
52
  "react-native": "0.69.5",
@@ -100,7 +100,7 @@
100
100
  }
101
101
  },
102
102
  "engines": {
103
- "node": ">=12.10.0"
103
+ "node": ">=14.5.0"
104
104
  },
105
105
  "jest": {
106
106
  "setupFiles": [
@@ -184,5 +184,5 @@
184
184
  }
185
185
  }
186
186
  },
187
- "gitHead": "7fef4609b820542ce27263e0c2cd1f03a2ae02fe"
187
+ "gitHead": "e39754e793d51241d301c756faa193a9a9fa4c59"
188
188
  }
@@ -12,6 +12,7 @@ class DetoxWorker {
12
12
  constructor(context) {
13
13
  this._context = context;
14
14
  this._isCleaningUp = false;
15
+ this._injectedGlobalProperties = [];
15
16
  this._config = context[symbols.config];
16
17
  this._runtimeErrorComposer = new DetoxRuntimeErrorComposer(this._config);
17
18
  this._client = null;
@@ -134,11 +135,14 @@ class DetoxWorker {
134
135
  Object.assign(this, matchers);
135
136
 
136
137
  if (behaviorConfig.init.exposeGlobals) {
137
- Object.assign(DetoxWorker.global, {
138
+ const injectedGlobals = {
138
139
  ...matchers,
139
140
  device: this.device,
140
141
  detox: this,
141
- });
142
+ };
143
+
144
+ this._injectedGlobalProperties = Object.keys(injectedGlobals);
145
+ Object.assign(DetoxWorker.global, injectedGlobals);
142
146
  }
143
147
 
144
148
  // @ts-ignore
@@ -163,6 +167,10 @@ class DetoxWorker {
163
167
  async cleanup() {
164
168
  this._isCleaningUp = true;
165
169
 
170
+ for (const key of this._injectedGlobalProperties) {
171
+ delete DetoxWorker.global[key];
172
+ }
173
+
166
174
  if (this._artifactsManager) {
167
175
  await this._artifactsManager.onBeforeCleanup();
168
176
  this._artifactsManager = null;
@@ -274,7 +282,7 @@ class DetoxWorker {
274
282
  }
275
283
 
276
284
  /**
277
- * @type {NodeJS.Global}
285
+ * @type {NodeJS.Global | {}}
278
286
  */
279
287
  DetoxWorker.global = global;
280
288
 
@@ -7,11 +7,13 @@ const symbols = require('../symbols');
7
7
 
8
8
  const DetoxConstants = require('./DetoxConstants');
9
9
 
10
+ //#region Protected symbols
10
11
  const $cleanup = Symbol('cleanup');
11
12
  const $restoreSessionState = Symbol('restoreSessionState');
12
13
  const $sessionState = Symbol('restoreSessionState');
13
14
  const $status = Symbol('status');
14
15
  const $worker = Symbol('worker');
16
+ //#endregion
15
17
 
16
18
  class DetoxContext {
17
19
  constructor() {
@@ -15,16 +15,10 @@ class DetoxInternalsFacade {
15
15
  this.installWorker = context[symbols.installWorker];
16
16
  this.uninstallWorker = context[symbols.uninstallWorker];
17
17
  this.onHookFailure = context[symbols.onHookFailure];
18
- this.onHookStart = context[symbols.onHookStart];
19
- this.onHookSuccess = context[symbols.onHookSuccess];
20
18
  this.onRunDescribeFinish = context[symbols.onRunDescribeFinish];
21
19
  this.onRunDescribeStart = context[symbols.onRunDescribeStart];
22
- this.onRunFinish = context[symbols.onRunFinish];
23
- this.onRunStart = context[symbols.onRunStart];
24
20
  this.onTestDone = context[symbols.onTestDone];
25
21
  this.onTestFnFailure = context[symbols.onTestFnFailure];
26
- this.onTestFnStart = context[symbols.onTestFnStart];
27
- this.onTestFnSuccess = context[symbols.onTestFnSuccess];
28
22
  this.onTestStart = context[symbols.onTestStart];
29
23
  this.reportTestResults = context[symbols.reportTestResults];
30
24
  this.resolveConfig = context[symbols.resolveConfig];
@@ -17,8 +17,10 @@ const globSync = glob.sync;
17
17
 
18
18
  const DetoxContext = require('./DetoxContext');
19
19
 
20
+ // Protected symbols
20
21
  const { $restoreSessionState, $sessionState, $worker } = DetoxContext.protected;
21
22
 
23
+ //#region Private symbols
22
24
  const _finalizeLogs = Symbol('finalizeLogs');
23
25
  const _finalizeLogsSync = Symbol('finalizeLogsSync');
24
26
  const _globalLifecycleHandler = Symbol('globalLifecycleHandler');
@@ -29,6 +31,7 @@ const _dirty = Symbol('dirty');
29
31
  const _emergencyTeardown = Symbol('emergencyTeardown');
30
32
  const _areLogsEnabled = Symbol('areLogsEnabled');
31
33
  const _lifecycleLogger = Symbol('lifecycleLogger');
34
+ //#endregion
32
35
 
33
36
  class DetoxPrimaryContext extends DetoxContext {
34
37
  constructor() {
@@ -140,10 +143,12 @@ class DetoxPrimaryContext extends DetoxContext {
140
143
  * @param {Partial<DetoxInternals.DetoxInstallWorkerOptions>} [opts]
141
144
  */
142
145
  async [symbols.installWorker](opts = {}) {
143
- const workerId = this[$sessionState].workerId = opts.workerId = opts.workerId || 'worker';
146
+ const workerId = opts.workerId || 'worker';
147
+
148
+ this[$sessionState].workerId = workerId;
144
149
  this[_ipcServer].onRegisterWorker({ workerId });
145
150
 
146
- await super[symbols.installWorker](opts);
151
+ await super[symbols.installWorker]({ ...opts, workerId });
147
152
  }
148
153
 
149
154
  /** @override */
@@ -6,9 +6,13 @@ const symbols = require('../symbols');
6
6
 
7
7
  const DetoxContext = require('./DetoxContext');
8
8
 
9
+ // Protected symbols
9
10
  const { $restoreSessionState, $sessionState, $worker } = DetoxContext.protected;
11
+
12
+ //#region Private symbols
10
13
  const _ipcClient = Symbol('ipcClient');
11
14
  const _shortLifecycle = Symbol('shortLifecycle');
15
+ //#endregion
12
16
 
13
17
  class DetoxSecondaryContext extends DetoxContext {
14
18
  constructor() {
@@ -74,9 +78,9 @@ class DetoxSecondaryContext extends DetoxContext {
74
78
 
75
79
  /** @override */
76
80
  async [symbols.installWorker](opts = {}) {
77
- const workerId = opts.workerId = opts.workerId || 'worker';
81
+ const workerId = opts.workerId || 'worker';
78
82
  await this[_ipcClient].registerWorker(workerId);
79
- await super[symbols.installWorker](opts);
83
+ await super[symbols.installWorker]({ ...opts, workerId });
80
84
  }
81
85
  //#endregion
82
86
 
@@ -1 +0,0 @@
1
- e87aec483ca0f1a8681dd604c172b1496be36552
@@ -1 +0,0 @@
1
- 4af74d1ca1aaeaa1d39e5d8911cbd10161b3114367691907d8e1618033d5b3e6
@@ -1 +0,0 @@
1
- 52171a50fce017136149bb98c6451148d77e4cf114b3026917dc51a603bd3e0f13aecdacf29a5f69731fa35767a0bd6947dfe4e7d48b16e277b73e5b5cc21619
@@ -1 +0,0 @@
1
- 58eb8e948d53b73075a1f5e97f7e1ef87335451d
@@ -1 +0,0 @@
1
- 4e2bc47c1bd786a7305e50cf174b2a44b76185b3510f43e6239783aa976f6ed7
@@ -1 +0,0 @@
1
- 88399f3c653950bc413629a0801211e0532b1fa8dcc012c37855deb27e5a048b2813c85079e21763f194c76ead892762d2e357b18869a1e3e0d465405f733aa2
@@ -1 +0,0 @@
1
- af38d8520fe68b4005004b263bd44a99
@@ -1 +0,0 @@
1
- 4b05c8d532f93162c18be667feb8f603f8a07341
@@ -1 +0,0 @@
1
- 70d293de323b61f3f135b127ea949f8536f9a9693c13f4c496a68ceba31b2c2d
@@ -1 +0,0 @@
1
- fba1065b23a33a85282fbc1a47b80a2725dea603c2ccc4285956d04f7220d3428948b7dba61fe5ffad0928812c03f87549c4395b31df33e785e8b88fa5d46aeb