/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native/src/private/setup/__tests__/setUpDefaultReactNativeEnvironment-FeatureFlags-itest.js
28 строк
966 B
Rubén Norte
Rename setUpDefaultReactNativeEnvironment to scope it better (#53267)
14 авг 2025, 14:41
14 авг 2025, 14:41
f9c2aaf
Код
Авторство
О чём код?
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict-local * @format */ import * as ReactNativeFeatureFlags from '../../featureflags/ReactNativeFeatureFlags'; import * as ReactNativeFeatureFlagsBase from '../../featureflags/ReactNativeFeatureFlagsBase'; import setUpDefaultReactNativeEnvironment from 'react-native/src/private/setup/setUpDefaultReactNativeEnvironment'; describe('setUpReactNativeEnvironment (feature flags side-effects)', () => { it('should not read any feature flags', () => { ReactNativeFeatureFlagsBase.dangerouslyResetForTesting(); setUpDefaultReactNativeEnvironment(false); expect(() => { // If any feature flags were read, this call would fail. ReactNativeFeatureFlags.override({ jsOnlyTestFlag: () => true, }); }).not.toThrow(); }); });