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:
Rubén Norte
2024-01-30 06:09:27 -08:00
committed by Facebook GitHub Bot
parent 4c108aaae4
commit 9ef6d606a7
@@ -28,6 +28,10 @@ class ReactNativeFeatureFlagsTest : public testing::Test {
void SetUp() override {
overrideAccessCount = 0;
}
void TearDown() override {
ReactNativeFeatureFlags::dangerouslyReset();
}
};
TEST_F(ReactNativeFeatureFlagsTest, providesDefaults) {