【发布时间】:2020-12-08 11:06:30
【问题描述】:
我正在尝试将 detox e2e 测试添加到我的项目中。我浏览了它的文档,但是,我无法在我的机器上安装它。 这是我的 devDependencies:
"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/preset-env": "^7.12.7",
"@babel/preset-flow": "^7.12.1",
"@babel/preset-react": "^7.12.7",
"@babel/runtime": "^7.4.5",
"@testing-library/jest-native": "^3.4.3",
"@testing-library/react-native": "^7.1.0",
"@types/react-native-sqlite-storage": "^3.3.1",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.8.0",
"babel-plugin-add-module-exports": "^1.0.4",
"babel-plugin-dynamic-import-node": "^2.3.3",
"babel-plugin-transform-remove-console": "^6.9.4",
"detox": "^17.14.3",
"jest": "^24.9.0",
"jest-circus": "^26.6.3",
"metro-react-native-babel-preset": "^0.54.1",
"prettier": "^1.18.2",
"react-test-renderer": "16.8.3"
}
另外,我有 installed npm install -g detox-cli ,但我得到了 command not found: detox
node : 10.22.1
os: Catalina
react-native: 0.61.2
【问题讨论】:
-
嗯。如果没有找到
detox,我认为你的路径有问题。 -
@LeoNatan 我如何查看它?因为其他命令正在运行(node、npm、react-native 等)。
-
我不确定,我对 node/npm 生态系统不是很熟悉,我只是容忍它足以能够在 Detox 上工作。对不起。尝试在此处添加更多标签以引起 node/npm 专家的注意。
-
@LeoNatan 感谢您的帮助 :))) 我添加了更多标签
-
对于 mac:尝试运行命令 'brew install detox'
标签: node.js react-native npm detox