Rename setUpDefaultReactNativeEnvironment to scope it better (#53267)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53267

Changelog: [internal]

Test files that verify the behavior of the global setup can only have a single test, as we can't really reset it across tests. Because of that, I'm renaming the current one to make the behavior under test more explicit.

Reviewed By: rshest

Differential Revision: D80177333

fbshipit-source-id: df9eeba15906bc6071940824dad9e576a267f499
This commit is contained in:
Rubén Norte
2025-08-14 04:41:13 -07:00
committed by Facebook GitHub Bot
parent 614231d4df
commit f9c2aaf3e7
2 changed files with 2 additions and 2 deletions
@@ -10,7 +10,7 @@
import setUpDefaultReactNativeEnvironment from 'react-native/src/private/setup/setUpDefaultReactNativeEnvironment';
describe('setUpReactNativeEnvironment', () => {
describe('setUpReactNativeEnvironment (components side-effects)', () => {
it('should not load components as a side effect', () => {
// We set up has not been done yet.
expect(globalThis.self).toBeUndefined();
@@ -12,7 +12,7 @@ import * as ReactNativeFeatureFlags from '../../featureflags/ReactNativeFeatureF
import * as ReactNativeFeatureFlagsBase from '../../featureflags/ReactNativeFeatureFlagsBase';
import setUpDefaultReactNativeEnvironment from 'react-native/src/private/setup/setUpDefaultReactNativeEnvironment';
describe('setUpReactNativeEnvironment', () => {
describe('setUpReactNativeEnvironment (feature flags side-effects)', () => {
it('should not read any feature flags', () => {
ReactNativeFeatureFlagsBase.dangerouslyResetForTesting();