ReactDOMServerIntegrationLegacyContext-test.js — react Source File
Architecture documentation for ReactDOMServerIntegrationLegacyContext-test.js, a javascript file in the react codebase.
Entity Profile
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 ./scripts/jest/ReactDOMServerIntegrationEnvironment
*/
'use strict';
const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegrationTestUtils');
let PropTypes;
let React;
let ReactDOMClient;
let ReactDOMServer;
let assertConsoleErrorDev;
function initModules() {
// Reset warning cache.
jest.resetModules();
PropTypes = require('prop-types');
React = require('react');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
assertConsoleErrorDev = require('internal-test-utils').assertConsoleErrorDev;
// Make them available to the helpers.
return {
ReactDOMClient,
ReactDOMServer,
};
}
const {
resetModules,
itRenders,
itThrowsWhenRendering,
clientRenderOnBadMarkup,
} = ReactDOMServerIntegrationUtils(initModules);
describe('ReactDOMServerIntegration', () => {
beforeEach(() => {
resetModules();
});
afterEach(() => {
// TODO: This is a hack because expectErrors does not restore mock,
// however fixing it requires a major refactor to all these tests.
if (console.error.mockClear) {
console.error.mockRestore();
}
});
describe('legacy context', function () {
// The `itRenders` test abstraction doesn't work with @gate so we have
// to do this instead.
if (gate(flags => flags.disableLegacyContext)) {
it('empty test to stop Jest from being a complainy complainer', () => {});
// ... (304 more lines)
Domain
Subdomains
Functions
Classes
Source
Frequently Asked Questions
What does ReactDOMServerIntegrationLegacyContext-test.js do?
ReactDOMServerIntegrationLegacyContext-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 ReactDOMServerIntegrationLegacyContext-test.js?
ReactDOMServerIntegrationLegacyContext-test.js defines 1 function(s): initModules.
Where is ReactDOMServerIntegrationLegacyContext-test.js in the architecture?
ReactDOMServerIntegrationLegacyContext-test.js is located at packages/react-dom/src/__tests__/ReactDOMServerIntegrationLegacyContext-test.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-dom/src/__tests__).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free