问题
I'm trying to run some e2e tests in my react-native up I'm using Detox but I keep getting the following error
1) "before all" hook:
Error: Timeout of 120000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
child_process.js:644
throw err;
^
Error: Command failed: node_modules/.bin/mocha e2e --opts e2e/mocha.opts
at checkExecSyncError (child_process.js:601:13)
at Object.execSync (child_process.js:641:13)
at runMocha (/Users/Almog/Full-Time-Employment/Construction-Cloud/RnD/CCMobileApp/node_modules/detox/local-cli/detox-test.js:72:6)
at Object.<anonymous> (/Users/Almog/Full-Time-Employment/Construction-Cloud/RnD/CCMobileApp/node_modules/detox/local-cli/detox-test.js:50:5)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Function.Module.runMain (module.js:684:10)
回答1:
Try to run it with detox test --loglevel verbose
flag it may provide you additional information on what is the issue.
来源:https://stackoverflow.com/questions/49042947/detox-error-timeout-of-120000ms-exceeded-for-async-tests-and-hooks