首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装Wix/Detox -运行它们的本机响应示例

安装Wix/Detox -运行它们的本机响应示例
EN

Stack Overflow用户
提问于 2020-10-02 08:48:27
回答 1查看 2.3K关注 0票数 2

从Wix解毒看起来是一个非常有用的工具,我一直渴望尝试它。试图跟随演示反应本机文件夹中的自述,但我认为它有点过时。

如前所述,我无法使它起作用。以下是我认为自述中缺少的东西

  • npm install -g detox-cli -缺失
  • detox init --runner jest -缺失

我已经尝试将我的.detoxrc.json设置为

代码语言:javascript
复制
{
  "testRunner": "jest",
  "runnerConfig": "e2e/config.json",
  "configurations": {
    "ios": {
      "type": "ios.simulator",
      "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/example.app",
      "device": {
        "type": "iPhone 11"
      }
    }
  }
}

但是在一个终端中运行npm startdetox build -c ios会抛出以下内容

代码语言:javascript
复制
$ detox build -c ios
detox[89936] ERROR: [cli.js] DetoxConfigError: Could not find a build script inside "ios" configuration.
detox[89936] ERROR: [cli.js] 
detox[89936] ERROR: [cli.js] HINT: Check contents of your Detox config at path:
detox[89936] ERROR: [cli.js] /Users/norfeldt/Desktop/Detox/examples/demo-react-native/.detoxrc.json
detox[89936] ERROR: [cli.js] 
detox[89936] ERROR: [cli.js] {
detox[89936] ERROR: [cli.js]   configurations: {
detox[89936] ERROR: [cli.js]     ios: {
detox[89936] ERROR: [cli.js]       type: 'ios.simulator',
detox[89936] ERROR: [cli.js]       binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/example.app',
detox[89936] ERROR: [cli.js]       device: [Object]
detox[89936] ERROR: [cli.js]     }
detox[89936] ERROR: [cli.js]   }
detox[89936] ERROR: [cli.js] }

运行detox build --configuration ios.sim.release (如自述的中所述)抛出以下内容:

代码语言:javascript
复制
$ detox build --configuration ios.sim.release
detox[91765] ERROR: [cli.js] DetoxConfigError: Failed to find a configuration named "ios.sim.release" in Detox config at path:
detox[91765] ERROR: [cli.js] /Users/norfeldt/Desktop/Detox/examples/demo-react-native/.detoxrc.json
detox[91765] ERROR: [cli.js] 
detox[91765] ERROR: [cli.js] HINT: Below are the configurations Detox was able to find:
detox[91765] ERROR: [cli.js] * ios

会为我认为错过的东西做一个公关,但希望确保所有的事情都能先工作-我无法做到。

如能提供任何帮助,将不胜感激。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-10-03 04:22:59

请注意,演示项目不再为iOS维护。您最好创建一个新的RN项目,按照我们的文档集成Detox,并开始添加您的第一个测试。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64168665

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档