MCPcopy Index your code
hub / github.com/react/react / getTestDocument

Function getTestDocument

packages/react-dom/src/__tests__/ReactRenderDocument-test.js:20–29  ·  view source on GitHub ↗
(markup)

Source from the content-addressed store, hash-verified

18let assertLog;
19
20function getTestDocument(markup) {
21 const doc = document.implementation.createHTMLDocument('');
22 doc.open();
23 doc.write(
24 markup ||
25 '<!doctype html><html><meta charset=utf-8><title>test doc</title>',
26 );
27 doc.close();
28 return doc;
29}
30
31function normalizeError(msg) {
32 // Take the first sentence to make it easier to assert on.

Callers 1

Calls 2

writeMethod · 0.65
closeMethod · 0.65

Tested by

no test coverage detected