浏览代码

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

Yogev Ben David 6 年前
父节点
当前提交
069f1a7408
没有帐户链接到提交者的电子邮件
共有 2 个文件被更改,包括 8 次插入8 次删除
  1. 7
    7
      e2e/init.js
  2. 1
    1
      package.json

+ 7
- 7
e2e/init.js 查看文件

@@ -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 查看文件

@@ -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",