mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Use native as the source of truth to decide if a test should use Fabric
Reviewed By: fkgozali Differential Revision: D7304221 fbshipit-source-id: cdd7053e6ce6522474df261db5710e2d9c013be6
This commit is contained in:
committed by
Facebook Github Bot
parent
0d924dd629
commit
785c8f7eb9
+6
-1
@@ -12,6 +12,7 @@ import android.test.ActivityInstrumentationTestCase2;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.testing.fabric.FabricTestModule;
|
||||
import com.facebook.react.testing.idledetection.IdleWaiter;
|
||||
|
||||
/**
|
||||
@@ -110,7 +111,11 @@ public abstract class ReactInstrumentationTest extends
|
||||
* Override this method to provide extra native modules to be loaded before the app starts
|
||||
*/
|
||||
protected ReactInstanceSpecForTest createReactInstanceSpecForTest() {
|
||||
return new ReactInstanceSpecForTest();
|
||||
ReactInstanceSpecForTest instanceSpec = new ReactInstanceSpecForTest();
|
||||
if (isFabricTest()) {
|
||||
instanceSpec.addNativeModule(new FabricTestModule(isFabricTest()));
|
||||
}
|
||||
return instanceSpec;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user