2

Running npx detox test --configuration android.emu.release giving these error on detox.

detox[44685] ERROR: [cli.js] Require stack:
detox[44685] ERROR: [cli.js] - /Users/sumukhahegde/Code/OpenSource/e2eTest/node_modules/detox/local-cli/utils/splitArgv.js
detox[44685] ERROR: [cli.js] - /Users/sumukhahegde/Code/OpenSource/e2eTest/node_modules/detox/local-cli/test.js
detox[44685] ERROR: [cli.js] - /Users/sumukhahegde/Code/OpenSource/e2eTest/node_modules/detox/node_modules/yargs/index.cjs
detox[44685] ERROR: [cli.js] - /Users/sumukhahegde/Code/OpenSource/e2eTest/node_modules/detox/local-cli/cli.js ```

1 Answers1

0

Currently, the default test runner for Detox is mocha.

Therefore, if you wish to use mocha, you need to include it in your project as a dependency, and update the detox configuration file, as shown in the snippet below, to include a path leading to your mocha configuration.

However, if you do wish to use Jest (the recommended test runner), then a "testConfig" value needs to be defined alongside the "runnerConfig".

The snippet below gives an idea of what your root detox configuration file should look like

{
  "testRunner": "jest",  // Specify the test runner if using Jest, or it defaults to mocha
  "runnerConfig": "e2e/config.json", // specify the path to your runner's configuration
  "devices": {
    "emulator": {
      "type": "android.emulator",
      "device": {
        "avdName": "5.4_FWVGA_API_30"
      }
    }
  },
... //more configurations
}