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

ReactSymbols-test.internal.js — react Source File

Architecture documentation for ReactSymbols-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
 */
'use strict';

describe('ReactSymbols', () => {
  beforeEach(() => jest.resetModules());

  const expectToBeUnique = keyValuePairs => {
    const map = new Map();
    keyValuePairs.forEach(([key, value]) => {
      if (map.has(value)) {
        throw Error(
          `${key} value ${value.toString()} is the same as ${map.get(value)}.`,
        );
      }
      map.set(value, key);
    });
  };

  it('Symbol values should be unique', () => {
    expectToBeUnique(Object.entries(require('shared/ReactSymbols')));
  });
});

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free