Browse Source

Upgrade to detox 8.x.x (#3811)

Yogev Ben David 6 years ago
parent
commit
069f1a7408
No account linked to committer's email address
2 changed files with 8 additions and 8 deletions
  1. 7
    7
      e2e/init.js
  2. 1
    1
      package.json

+ 7
- 7
e2e/init.js View File

@@ -1,23 +1,23 @@
1 1
 const detox = require('detox');
2 2
 const config = require('../package.json').detox;
3 3
 const exec = require('shell-utils').exec;
4
+const adapter = require('detox/runners/jest/adapter');
5
+
4 6
 jest.setTimeout(300000);
7
+jasmine.getEnv().addReporter(adapter); // don't forget this line
5 8
 
6 9
 beforeAll(async () => {
7
-  await detox.init(config, { launchApp: false });
10
+  await detox.init(config, {launchApp: false});
8 11
   disableAndroidEmulatorAnimations();
9 12
 });
10 13
 
11 14
 afterAll(async () => {
15
+  await adapter.afterAll();
12 16
   await detox.cleanup();
13 17
 });
14 18
 
15
-beforeEach(async function() {
16
-    await detox.beforeEach(jasmine.testPath);
17
-});
18
-
19
-afterEach(async function() {
20
-    await detox.afterEach(jasmine.testPath);
19
+beforeEach(async () => {
20
+  await adapter.beforeEach();
21 21
 });
22 22
 
23 23
 function disableAndroidEmulatorAnimations() {

+ 1
- 1
package.json View File

@@ -64,7 +64,7 @@
64 64
     "@types/react": "16.x.x",
65 65
     "@types/react-native": "0.51.x",
66 66
     "@types/react-test-renderer": "16.x.x",
67
-    "detox": "7.x.x",
67
+    "detox": "8.x.x",
68 68
     "handlebars": "4.x.x",
69 69
     "jest": "22.x.x",
70 70
     "react": "16.2.0",