ReactLegacyErrorBoundaries-test.internal.js — react Source File
Architecture documentation for ReactLegacyErrorBoundaries-test.internal.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
*/
'use strict';
let PropTypes;
let React;
let ReactDOM;
let act;
let assertConsoleErrorDev;
// TODO: Refactor this test once componentDidCatch setState is deprecated.
describe('ReactLegacyErrorBoundaries', () => {
let log;
let BrokenConstructor;
let BrokenComponentWillMount;
let BrokenComponentDidMount;
let BrokenComponentWillReceiveProps;
let BrokenComponentWillUpdate;
let BrokenComponentDidUpdate;
let BrokenComponentWillUnmount;
let BrokenRenderErrorBoundary;
let BrokenComponentWillMountErrorBoundary;
let BrokenComponentDidMountErrorBoundary;
let BrokenRender;
let ErrorBoundary;
let BothErrorBoundaries;
let ErrorMessage;
let NoopErrorBoundary;
let RetryErrorBoundary;
let Normal;
beforeEach(() => {
jest.resetModules();
PropTypes = require('prop-types');
ReactDOM = require('react-dom');
React = require('react');
act = require('internal-test-utils').act;
assertConsoleErrorDev =
require('internal-test-utils').assertConsoleErrorDev;
log = [];
BrokenConstructor = class extends React.Component {
constructor(props) {
super(props);
log.push('BrokenConstructor constructor [!]');
throw new Error('Hello');
}
render() {
log.push('BrokenConstructor render');
return <div>{this.props.children}</div>;
}
// ... (2202 more lines)
Domain
Subdomains
Source
Frequently Asked Questions
What does ReactLegacyErrorBoundaries-test.internal.js do?
ReactLegacyErrorBoundaries-test.internal.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
Where is ReactLegacyErrorBoundaries-test.internal.js in the architecture?
ReactLegacyErrorBoundaries-test.internal.js is located at packages/react-dom/src/__tests__/ReactLegacyErrorBoundaries-test.internal.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