/
ashipov
/
react
Обзор
Документация
Войти
/
ashipov
/
react
Код
Запросы
0
Задачи 2.0
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
packages/react-native-renderer/src/__tests__/ReactNativeError-test.internal.js
35 строк
917 B
Timothy Yung
Delete `__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED` from React Native Renderer (#31276)
16 окт 2024, 21:19
Не верифицирован
16 окт 2024, 21:19
a3d9ea0
Код
Авторство
О чём код?
/** * 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. * * @emails react-core * @jest-environment node */ 'use strict'; let createReactNativeComponentClass; describe('ReactNativeError', () => { beforeEach(() => { jest.resetModules(); createReactNativeComponentClass = require('react-native/Libraries/ReactPrivate/ReactNativePrivateInterface') .ReactNativeViewConfigRegistry.register; }); it('should throw error if null component registration getter is used', () => { expect(() => { try { createReactNativeComponentClass('View', null); } catch (e) { throw new Error(e.toString()); } }).toThrow( 'View config getter callback for component `View` must be a function (received `null`)', ); }); });