ReactServer-test.js — react Source File
Architecture documentation for ReactServer-test.js, a javascript file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR e31cc174_0857_d00e_5409_ea35dec17189["ReactServer-test.js"] 90dd5a69_211d_53b2_77da_85ccb1a4593a["node:async_hooks"] e31cc174_0857_d00e_5409_ea35dec17189 --> 90dd5a69_211d_53b2_77da_85ccb1a4593a style e31cc174_0857_d00e_5409_ea35dec17189 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
* @jest-environment node
*/
'use strict';
import {AsyncLocalStorage} from 'node:async_hooks';
let act;
let React;
let ReactNoopServer;
function normalizeCodeLocInfo(str) {
return (
str &&
str.replace(/^ +(?:at|in) ([\S]+)[^\n]*/gm, function (m, name) {
const dot = name.lastIndexOf('.');
if (dot !== -1) {
name = name.slice(dot + 1);
}
return ' in ' + name + (/\d/.test(m) ? ' (at **)' : '');
})
);
}
/**
* Removes all stackframes not pointing into this file
*/
function ignoreListStack(str) {
if (!str) {
return str;
}
let ignoreListedStack = '';
const lines = str.split('\n');
// eslint-disable-next-line no-for-of-loops/no-for-of-loops
for (const line of lines) {
if (line.indexOf(__filename) === -1) {
} else {
ignoreListedStack += '\n' + line.replace(__dirname, '.');
}
}
return ignoreListedStack;
}
const currentTask = new AsyncLocalStorage({defaultValue: null});
describe('ReactServer', () => {
beforeEach(() => {
jest.resetModules();
console.createTask = jest.fn(taskName => {
return {
// ... (127 more lines)
Domain
Subdomains
Functions
Dependencies
- node:async_hooks
Source
Frequently Asked Questions
What does ReactServer-test.js do?
ReactServer-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 ReactServer-test.js?
ReactServer-test.js defines 2 function(s): ignoreListStack, normalizeCodeLocInfo.
What does ReactServer-test.js depend on?
ReactServer-test.js imports 1 module(s): node:async_hooks.
Where is ReactServer-test.js in the architecture?
ReactServer-test.js is located at packages/react-server/src/__tests__/ReactServer-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