Home / File/ shallow-test.js — react Source File

shallow-test.js — react Source File

Architecture documentation for shallow-test.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
 */

'use strict';

describe('shallow', () => {
  it('throws an error on init', () => {
    const ReactShallowRenderer = require('../shallow.js').default;
    expect(() => {
      // eslint-disable-next-line no-new
      new ReactShallowRenderer();
    }).toThrow(
      'react-test-renderer/shallow has been removed. See https://react.dev/warnings/react-test-renderer.'
    );
  });
});

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free