如何解决设置Wix / Detox-运行他们的本机示例
Wix的排毒功能非常有用,我一直很想尝试一下。试图遵循README in the demo-react-native folder,但我认为它有点过时了。
如前所述,我无法使其正常工作。这是我认为自述文件中缺少的内容
-
npm install -g detox-cli
-丢失 -
detox init --runner jest
-丢失
我尝试将.detoxrc.json
设置为
{
"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 start
并detox build -c ios
会抛出该错误
$ 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
(如 README 中所述)会引发以下情况:
$ 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
本来会为我认为缺少的事情做一个PR,但想确保它首先起作用-我无法理解。
任何帮助将不胜感激
解决方法
请注意,演示项目不再为iOS维护。您最好创建一个新的RN项目,按照我们的文档集成Detox,然后开始添加您的第一个测试。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。