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

ReactART-test.js — react Source File

Architecture documentation for ReactART-test.js, a javascript file in the react codebase. 6 imports, 0 dependents.

File javascript BabelCompiler Validation 6 imports 1 functions 3 classes

Entity Profile

Dependency Diagram

graph LR
  1ac9edb3_efa7_97a7_5bb1_dd244773303f["ReactART-test.js"]
  5b4a2253_4616_3ba7_28ed_82ac7dafb195["react-art"]
  1ac9edb3_efa7_97a7_5bb1_dd244773303f --> 5b4a2253_4616_3ba7_28ed_82ac7dafb195
  9f7b6def_cefb_2aa0_a327_6b24d5285eaf["svg"]
  1ac9edb3_efa7_97a7_5bb1_dd244773303f --> 9f7b6def_cefb_2aa0_a327_6b24d5285eaf
  26b2e4e4_9124_2852_4c08_0a262a3c5ca3["current"]
  1ac9edb3_efa7_97a7_5bb1_dd244773303f --> 26b2e4e4_9124_2852_4c08_0a262a3c5ca3
  af70f932_f3d9_da26_1df9_b4a1afdeb40e["Circle"]
  1ac9edb3_efa7_97a7_5bb1_dd244773303f --> af70f932_f3d9_da26_1df9_b4a1afdeb40e
  8c94cd20_d510_8cec_3b51_7110a89905b1["Rectangle"]
  1ac9edb3_efa7_97a7_5bb1_dd244773303f --> 8c94cd20_d510_8cec_3b51_7110a89905b1
  4b4763e5_1863_aeb8_8956_d0b8c5e8a2fb["Wedge"]
  1ac9edb3_efa7_97a7_5bb1_dd244773303f --> 4b4763e5_1863_aeb8_8956_d0b8c5e8a2fb
  style 1ac9edb3_efa7_97a7_5bb1_dd244773303f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

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
 */

/*jslint evil: true */

'use strict';

const React = require('react');
const Scheduler = require('scheduler');

import * as ReactART from 'react-art';
import ARTSVGMode from 'art/modes/svg';
import ARTCurrentMode from 'art/modes/current';
// Since these are default exports, we need to import them using ESM.
// Since they must be on top, we need to import this before ReactDOM.
import Circle from 'react-art/Circle';
import Rectangle from 'react-art/Rectangle';
import Wedge from 'react-art/Wedge';

const {act} = require('internal-test-utils');

// Isolate DOM renderer.
jest.resetModules();
// share isomorphic
jest.mock('scheduler', () => Scheduler);
jest.mock('react', () => React);
const ReactDOMClient = require('react-dom/client');

let Group;
let Shape;
let Surface;
let TestComponent;

let groupRef;

const Missing = {};

function testDOMNodeStructure(domNode, expectedStructure) {
  expect(domNode).toBeDefined();
  expect(domNode.nodeName).toBe(expectedStructure.nodeName);
  for (const prop in expectedStructure) {
    if (!expectedStructure.hasOwnProperty(prop)) {
      continue;
    }
    if (prop !== 'nodeName' && prop !== 'children') {
      if (expectedStructure[prop] === Missing) {
        expect(domNode.hasAttribute(prop)).toBe(false);
      } else {
        expect(domNode.getAttribute(prop)).toBe(expectedStructure[prop]);
      }
    }
  }
  if (expectedStructure.children) {
    expectedStructure.children.forEach(function (subTree, index) {
// ... (471 more lines)

Domain

Subdomains

Dependencies

  • Circle
  • Rectangle
  • Wedge
  • current
  • react-art
  • svg

Frequently Asked Questions

What does ReactART-test.js do?
ReactART-test.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in ReactART-test.js?
ReactART-test.js defines 1 function(s): testDOMNodeStructure.
What does ReactART-test.js depend on?
ReactART-test.js imports 6 module(s): Circle, Rectangle, Wedge, current, react-art, svg.
Where is ReactART-test.js in the architecture?
ReactART-test.js is located at packages/react-art/src/__tests__/ReactART-test.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-art/src/__tests__).

Analyze Your Own Codebase

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

Try Supermodel Free