Home / File/ ReactDOMServerIntegrationEnvironment.js — react Source File

ReactDOMServerIntegrationEnvironment.js — react Source File

Architecture documentation for ReactDOMServerIntegrationEnvironment.js, a javascript file in the react codebase.

Entity Profile

Relationship Graph

Source Code

'use strict';

const ReactJSDOMEnvironment = require('./ReactJSDOMEnvironment');
const {TestEnvironment: NodeEnvironment} = require('jest-environment-node');

/**
 * Test environment for testing integration of react-dom (browser) with react-dom/server (node)
 */
class ReactDOMServerIntegrationEnvironment extends NodeEnvironment {
  constructor(config, context) {
    super(config, context);

    this.domEnvironment = new ReactJSDOMEnvironment(config, context);

    this.global.window = this.domEnvironment.dom.window;
    this.global.document = this.global.window.document;
    this.global.navigator = this.global.window.navigator;
    this.global.Node = this.global.window.Node;
    this.global.addEventListener = this.global.window.addEventListener;
    this.global.MutationObserver = this.global.window.MutationObserver;
  }

  async setup() {
    await super.setup();
    await this.domEnvironment.setup();
  }

  async teardown() {
    await this.domEnvironment.teardown();
    await super.teardown();
  }
}

module.exports = ReactDOMServerIntegrationEnvironment;

Domain

Subdomains

Frequently Asked Questions

What does ReactDOMServerIntegrationEnvironment.js do?
ReactDOMServerIntegrationEnvironment.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Optimization subdomain.
Where is ReactDOMServerIntegrationEnvironment.js in the architecture?
ReactDOMServerIntegrationEnvironment.js is located at scripts/jest/ReactDOMServerIntegrationEnvironment.js (domain: BabelCompiler, subdomain: Optimization, directory: scripts/jest).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free