ReactServerRenderingBrowser-test.js — react Source File
Architecture documentation for ReactServerRenderingBrowser-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 node
*/
'use strict';
let React;
let ReactDOMServer;
let ReactDOMServerBrowser;
describe('ReactServerRenderingBrowser', () => {
beforeEach(() => {
jest.resetModules();
React = require('react');
ReactDOMServer = require('react-dom/server');
// For extra isolation between what would be two bundles on npm
jest.resetModules();
ReactDOMServerBrowser = require('react-dom/server.browser');
});
it('returns the same results as react-dom/server', () => {
class Nice extends React.Component {
render() {
return <h2>I am feeling very good today, thanks, how are you?</h2>;
}
}
function Greeting() {
return (
<div>
<h1>How are you?</h1>
<Nice />
</div>
);
}
expect(ReactDOMServerBrowser.renderToString(<Greeting />)).toEqual(
ReactDOMServer.renderToString(<Greeting />),
);
expect(ReactDOMServerBrowser.renderToStaticMarkup(<Greeting />)).toEqual(
ReactDOMServer.renderToStaticMarkup(<Greeting />),
);
});
});
Domain
Subdomains
Classes
Source
Frequently Asked Questions
What does ReactServerRenderingBrowser-test.js do?
ReactServerRenderingBrowser-test.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
Where is ReactServerRenderingBrowser-test.js in the architecture?
ReactServerRenderingBrowser-test.js is located at packages/react-dom/src/__tests__/ReactServerRenderingBrowser-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