mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
## Summary The React Native Renderer exports a `__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED` property with a single method that has no remaining call sites: `computeComponentStackForErrorReporting` This PR cleans up this unused export. ## How did you test this change? ``` $ yarn $ yarn flow fabric $ yarn test ```
36 lines
917 B
JavaScript
36 lines
917 B
JavaScript
/**
|
|
* 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`)',
|
|
);
|
|
});
|
|
});
|