mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
remove useMapNativeAccessor stuff
Summary: This was quite a rabit hole of remove deps -> delete dead code -> repeat. Waaay simpler now with less duplicate lookups, redundant type verification, and extra function calls. Reviewed By: mdvacca Differential Revision: D14486283 fbshipit-source-id: 035db30181755d046a1ae99760468b954b2449df
This commit is contained in:
committed by
Facebook Github Bot
parent
a46fba5dd3
commit
b257e06bc6
+3
-4
@@ -3,6 +3,7 @@ package com.facebook.react.tests.core;
|
||||
import static org.fest.assertions.api.Assertions.assertThat;
|
||||
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
import com.facebook.react.bridge.NoSuchKeyException;
|
||||
import com.facebook.react.bridge.UnexpectedNativeTypeException;
|
||||
import com.facebook.react.bridge.WritableNativeArray;
|
||||
import com.facebook.react.bridge.WritableNativeMap;
|
||||
@@ -27,7 +28,6 @@ public class WritableNativeMapTest {
|
||||
mMap.putMap("map", new WritableNativeMap());
|
||||
mMap.putArray("array", new WritableNativeArray());
|
||||
mMap.putBoolean("dvacca", true);
|
||||
mMap.setUseNativeAccessor(true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -90,14 +90,13 @@ public class WritableNativeMapTest {
|
||||
mMap.getArray("string");
|
||||
}
|
||||
|
||||
@Ignore("Needs to be implemented")
|
||||
@Test
|
||||
public void testErrorMessageContainsKey() {
|
||||
String key = "fkg";
|
||||
try {
|
||||
mMap.getString(key);
|
||||
Assert.fail("Expected an UnexpectedNativeTypeException to be thrown");
|
||||
} catch (UnexpectedNativeTypeException e) {
|
||||
Assert.fail("Expected an NoSuchKeyException to be thrown");
|
||||
} catch (NoSuchKeyException e) {
|
||||
assertThat(e.getMessage()).contains(key);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user