ReactFlightDOMForm-test.js — react Source File
Architecture documentation for ReactFlightDOMForm-test.js, a javascript file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR a1f03aac_5558_8eb7_418a_a3fa7bc06c1a["ReactFlightDOMForm-test.js"] d239078a_b350_3e26_f0a1_eea0406757eb["FizzTestUtils"] a1f03aac_5558_8eb7_418a_a3fa7bc06c1a --> d239078a_b350_3e26_f0a1_eea0406757eb style a1f03aac_5558_8eb7_418a_a3fa7bc06c1a 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 {insertNodesAndExecuteScripts} from 'react-dom/src/test-utils/FizzTestUtils';
// Polyfills for test environment
global.ReadableStream =
require('web-streams-polyfill/ponyfill/es6').ReadableStream;
global.TextEncoder = require('util').TextEncoder;
global.TextDecoder = require('util').TextDecoder;
// Polyfill stream methods on JSDOM.
global.Blob.prototype.stream = function () {
const impl = Object.getOwnPropertySymbols(this)[0];
const buffer = this[impl]._buffer;
return new ReadableStream({
start(c) {
c.enqueue(new Uint8Array(buffer));
c.close();
},
});
};
global.Blob.prototype.text = async function () {
const impl = Object.getOwnPropertySymbols(this)[0];
return this[impl]._buffer.toString('utf8');
};
// Don't wait before processing work on the server.
// TODO: we can replace this with FlightServer.act().
global.setTimeout = cb => cb();
let container;
let clientExports;
let serverExports;
let webpackMap;
let webpackServerMap;
let React;
let ReactDOMServer;
let ReactServerDOMServer;
let ReactServerDOMClient;
let ReactDOMClient;
let useActionState;
let act;
let assertConsoleErrorDev;
describe('ReactFlightDOMForm', () => {
beforeEach(() => {
jest.resetModules();
// Simulate the condition resolution
jest.mock('react', () => require('react/react.react-server'));
jest.mock('react-server-dom-webpack/server', () =>
// ... (987 more lines)
Domain
Subdomains
Classes
Dependencies
- FizzTestUtils
Source
Frequently Asked Questions
What does ReactFlightDOMForm-test.js do?
ReactFlightDOMForm-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 ReactFlightDOMForm-test.js?
ReactFlightDOMForm-test.js defines 3 function(s): global, stream, text.
What does ReactFlightDOMForm-test.js depend on?
ReactFlightDOMForm-test.js imports 1 module(s): FizzTestUtils.
Where is ReactFlightDOMForm-test.js in the architecture?
ReactFlightDOMForm-test.js is located at packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMForm-test.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-server-dom-webpack/src/__tests__).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free