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

ReactFlightAsyncDebugInfo-test.js — react Source File

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

File javascript BabelCompiler Validation 5 imports 1 functions 1 classes

Entity Profile

Dependency Diagram

graph LR
  3ff990fb_4d2c_e7ba_63a9_b0c56a5b8b81["ReactFlightAsyncDebugInfo-test.js"]
  da69be30_bc54_f29a_6a16_c758019ff49a["patchSetImmediate.js"]
  3ff990fb_4d2c_e7ba_63a9_b0c56a5b8b81 --> da69be30_bc54_f29a_6a16_c758019ff49a
  a2793b53_099e_e5da_a821_f47e4fa1f68f["patchSetImmediate"]
  3ff990fb_4d2c_e7ba_63a9_b0c56a5b8b81 --> a2793b53_099e_e5da_a821_f47e4fa1f68f
  9d39c81d_4e8c_4c68_e6c5_768eba0634d7["crypto"]
  3ff990fb_4d2c_e7ba_63a9_b0c56a5b8b81 --> 9d39c81d_4e8c_4c68_e6c5_768eba0634d7
  c0588312_ab09_8f72_8d9e_95868024d651["promises"]
  3ff990fb_4d2c_e7ba_63a9_b0c56a5b8b81 --> c0588312_ab09_8f72_8d9e_95868024d651
  b402a0fc_00db_e86d_b1ea_ad4f8e9faaca["path"]
  3ff990fb_4d2c_e7ba_63a9_b0c56a5b8b81 --> b402a0fc_00db_e86d_b1ea_ad4f8e9faaca
  style 3ff990fb_4d2c_e7ba_63a9_b0c56a5b8b81 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * @jest-environment node
 */
'use strict';

import {patchSetImmediate} from '../../../../scripts/jest/patchSetImmediate';

import crypto from 'crypto';
import fs from 'fs/promises';
import path from 'path';

let React;
let ReactServer;
let cache;
let ReactServerDOMServer;
let ReactServerDOMClient;
let Stream;
let observer;
let getDebugInfo;

const streamOptions = {
  objectMode: true,
};

function filterStackFrame(filename, functionName) {
  return (
    !filename.startsWith('node:') &&
    !filename.includes('node_modules') &&
    // Filter out our own internal source code since it'll typically be in node_modules
    (!filename.includes('/packages/') || filename.includes('/__tests__/')) &&
    !filename.includes('/build/') &&
    !functionName.includes('internal_')
  );
}

describe('ReactFlightAsyncDebugInfo', () => {
  beforeEach(() => {
    jest.resetModules();
    jest.useRealTimers();
    patchSetImmediate();
    global.console = require('console');

    jest.mock('react', () => require('react/react.react-server'));
    jest.mock('react-server-dom-webpack/server', () =>
      jest.requireActual('react-server-dom-webpack/server.node'),
    );
    ReactServer = require('react');
    ReactServerDOMServer = require('react-server-dom-webpack/server');
    cache = ReactServer.cache;

    jest.resetModules();
    jest.useRealTimers();
    patchSetImmediate();

    __unmockReact();
    jest.unmock('react-server-dom-webpack/server');
    jest.mock('react-server-dom-webpack/client', () =>
      jest.requireActual('react-server-dom-webpack/client.node'),
    );

// ... (3577 more lines)

Domain

Subdomains

Functions

Classes

Dependencies

Frequently Asked Questions

What does ReactFlightAsyncDebugInfo-test.js do?
ReactFlightAsyncDebugInfo-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 ReactFlightAsyncDebugInfo-test.js?
ReactFlightAsyncDebugInfo-test.js defines 1 function(s): filterStackFrame.
What does ReactFlightAsyncDebugInfo-test.js depend on?
ReactFlightAsyncDebugInfo-test.js imports 5 module(s): crypto, patchSetImmediate, patchSetImmediate.js, path, promises.
Where is ReactFlightAsyncDebugInfo-test.js in the architecture?
ReactFlightAsyncDebugInfo-test.js is located at packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-server/src/__tests__).

Analyze Your Own Codebase

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

Try Supermodel Free