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

index-test.internal.js — react Source File

Architecture documentation for index-test.internal.js, a javascript file in the react codebase. 3 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  6a79b8db_8663_727d_cf8d_8ad55d807b11["index-test.internal.js"]
  f4316f6a_6bd2_2c45_d5ba_4eca3b37ec0d["constants.js"]
  6a79b8db_8663_727d_cf8d_8ad55d807b11 --> f4316f6a_6bd2_2c45_d5ba_4eca3b37ec0d
  cfa588b4_57a7_0b0e_ec6d_2d8b58107071["index.js"]
  6a79b8db_8663_727d_cf8d_8ad55d807b11 --> cfa588b4_57a7_0b0e_ec6d_2d8b58107071
  7d91ff05_2240_1619_d742_200a91c5a4eb["createEventTarget"]
  6a79b8db_8663_727d_cf8d_8ad55d807b11 --> 7d91ff05_2240_1619_d742_200a91c5a4eb
  style 6a79b8db_8663_727d_cf8d_8ad55d807b11 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
 */

'use strict';

import {defaultBrowserChromeSize} from '../constants';

import {
  createEventTarget,
  describeWithPointerEvent,
  testWithPointerType,
  resetActivePointers,
} from '../index';

/**
 * Unit test helpers
 */
describeWithPointerEvent('describeWithPointerEvent', pointerEvent => {
  test('provides boolean to tests', () => {
    expect(pointerEvent).toMatchSnapshot();
  });

  testWithPointerType('testWithPointerType', pointerType => {
    expect(pointerType).toMatchSnapshot();
  });
});

/**
 * createEventTarget
 */
describe('createEventTarget', () => {
  let node;
  beforeEach(() => {
    node = document.createElement('div');
  });

  afterEach(() => {
    node = null;
    resetActivePointers();
  });

  it('returns expected API', () => {
    const target = createEventTarget(node);
    expect(target.node).toEqual(node);
    expect(Object.keys(target)).toMatchInlineSnapshot(`
      [
        "node",
        "blur",
        "click",
        "focus",
        "keydown",
        "keyup",
        "scroll",
        "virtualclick",
// ... (304 more lines)

Domain

Frequently Asked Questions

What does index-test.internal.js do?
index-test.internal.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain.
What does index-test.internal.js depend on?
index-test.internal.js imports 3 module(s): constants.js, createEventTarget, index.js.
Where is index-test.internal.js in the architecture?
index-test.internal.js is located at packages/dom-event-testing-library/__tests__/index-test.internal.js (domain: BabelCompiler, directory: packages/dom-event-testing-library/__tests__).

Analyze Your Own Codebase

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

Try Supermodel Free