Skip to content

Commit

Permalink
test(android): defer Detox ReactContext receiver timeout
Browse files Browse the repository at this point in the history
Not sure why Detox isn't getting the ReactContext
in New Architecture but probably needs a forward port

Until then, we run without it, avoid crashing
  • Loading branch information
mikehardy committed Feb 5, 2025
1 parent 26c3577 commit 96eef7e
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.google.firebase.appcheck.debug.testing.DebugAppCheckTestHelper;

import com.wix.detox.Detox;
import com.wix.detox.config.DetoxConfig;

import org.junit.Rule;
import org.junit.Test;
Expand All @@ -28,7 +29,13 @@ public class DetoxTest {

@Test
public void runDetoxTests() {
Detox.runTests(mActivityRule);

DetoxConfig detoxConfig = new DetoxConfig();
detoxConfig.idlePolicyConfig.masterTimeoutSec = 90;

Check warning on line 34 in tests/android/app/src/androidTest/java/com/invertase/testing/DetoxTest.java

View check run for this annotation

In Solidarity / Inclusive Language

Match Found

Please consider an alternative to `master`. Possibilities include: `primary`, `main`, `leader`, `active`, `writer`
Raw output
/master/gi
detoxConfig.idlePolicyConfig.idleResourceTimeoutSec = 60;
detoxConfig.rnContextLoadTimeoutSec = 2400;

Detox.runTests(mActivityRule, detoxConfig);
dumpCoverageData();
}

Expand Down

0 comments on commit 96eef7e

Please sign in to comment.