來自 Wix 的 Detox 看起來是一個非常有用的工具,我一直很想嘗試一下。嘗試按照 demo-react-native 文件夾中的自述文件進行操作,但我認為它有點過時了。如前所述,我無法讓它工作。這是我認為自述文件中缺少的內容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 iosdetox[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.jsondetox[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] }運行 (如READMEdetox build --configuration ios.sim.release中所述)拋出:$ detox build --configuration ios.sim.releasedetox[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.jsondetox[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,但我想首先確保它一切正?!易霾坏健H魏螏椭?,將不勝感激
設置 Wix/Detox - 運行他們的 React Native 示例
蝴蝶不菲
2023-04-14 17:08:18