Home / File/ ReactNativeError-test.internal.js — react Source File

ReactNativeError-test.internal.js — react Source File

Architecture documentation for ReactNativeError-test.internal.js, a javascript file in the react codebase.

Entity Profile

Source Code

/**
 * 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`)',
    );
  });
});

Frequently Asked Questions

What does ReactNativeError-test.internal.js do?
ReactNativeError-test.internal.js is a source file in the react codebase, written in javascript.
Where is ReactNativeError-test.internal.js in the architecture?
ReactNativeError-test.internal.js is located at packages/react-native-renderer/src/__tests__/ReactNativeError-test.internal.js (directory: packages/react-native-renderer/src/__tests__).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free