mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix broken ReactNativeFeatureFlagsTest test on iOS (#42699)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/42699 Changelog: [internal] The test was fine on C++. The reason is probably that C++ destroys the process between tests (effectively resetting singletons) while iOS doesn't. This fixes the test by implementing a correct `TearDown` method to reset the flags. Reviewed By: rshest Differential Revision: D53178474 fbshipit-source-id: 6a0f67f1a59fe47f73a495344d4c0daa8eafa3c4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4c108aaae4
commit
9ef6d606a7
+4
@@ -28,6 +28,10 @@ class ReactNativeFeatureFlagsTest : public testing::Test {
|
||||
void SetUp() override {
|
||||
overrideAccessCount = 0;
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
ReactNativeFeatureFlags::dangerouslyReset();
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(ReactNativeFeatureFlagsTest, providesDefaults) {
|
||||
|
||||
Reference in New Issue
Block a user