ReactMarkupServer-test.js — react Source File
Architecture documentation for ReactMarkupServer-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
*/
'use strict';
global.TextDecoder = require('util').TextDecoder;
global.TextEncoder = require('util').TextEncoder;
let React;
let ReactMarkup;
function normalizeCodeLocInfo(str) {
return (
str &&
String(str).replace(/\n +(?:at|in) ([\S]+)[^\n]*/g, function (m, name) {
return '\n in ' + name + ' (at **)';
})
);
}
if (!__EXPERIMENTAL__) {
it('should not be built in stable', () => {
try {
require('react-markup');
} catch (x) {
return;
}
throw new Error('Expected react-markup not to exist in stable.');
});
} else {
describe('ReactMarkup', () => {
beforeEach(() => {
jest.resetModules();
// We run in the react-server condition.
jest.mock('react', () => require('react/react.react-server'));
if (__EXPERIMENTAL__) {
jest.mock('react-markup', () =>
require('react-markup/react-markup.react-server'),
);
}
React = require('react');
if (__EXPERIMENTAL__) {
ReactMarkup = require('react-markup');
} else {
try {
require('react-markup/react-markup.react-server');
} catch (x) {
return;
}
throw new Error('Expected react-markup not to exist in stable.');
}
});
// ... (217 more lines)
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does ReactMarkupServer-test.js do?
ReactMarkupServer-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 ReactMarkupServer-test.js?
ReactMarkupServer-test.js defines 1 function(s): normalizeCodeLocInfo.
Where is ReactMarkupServer-test.js in the architecture?
ReactMarkupServer-test.js is located at packages/react-markup/src/__tests__/ReactMarkupServer-test.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-markup/src/__tests__).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free