Search code examples
iosreact-nativedetox

Detox: How to pass -disableRNTestingOverride 1 parameter


I'm using detox on the newest version and this commit (https://github.com/wix/Detox/commit/2507c1e4325936ed9f46c0f64571fa581c71ff5f) disabled the IS_TESTING field for our tests.

It mentions that we have to pass -disableRNTestingOverride 1 to disable this behavior, where do we have to set this?

Thank you in advance


Solution

  • You need to pass it as a launch argument to device.launchApp(), as shown here.

    await device.launchApp({launchArgs: {disableRNTestingOverride: 1}});