mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-03 22:48:25 +08:00
Reverted commit D3334273
Reviewed By: astreet Differential Revision: D3334273 fbshipit-source-id: a3849604ea89db74900850c294685e7da9aeeacc
This commit is contained in:
committed by
Facebook Github Bot 7
parent
757ab0b936
commit
705daabbb1
@@ -12,7 +12,6 @@ import javax.annotation.Nullable;
|
||||
|
||||
import com.facebook.react.bridge.BaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.annotations.ReactModule;
|
||||
|
||||
import static junit.framework.Assert.assertFalse;
|
||||
import static junit.framework.Assert.assertTrue;
|
||||
@@ -20,13 +19,17 @@ import static junit.framework.Assert.assertTrue;
|
||||
/**
|
||||
* NativeModule for tests that allows assertions from JS to propagate to Java.
|
||||
*/
|
||||
@ReactModule(name = "Assert")
|
||||
public class AssertModule extends BaseJavaModule {
|
||||
|
||||
private boolean mGotSuccess;
|
||||
private boolean mGotFailure;
|
||||
private @Nullable String mFirstFailureStackTrace;
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Assert";
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void fail(String stackTrace) {
|
||||
if (!mGotFailure) {
|
||||
|
||||
Reference in New Issue
Block a user