MCPcopy Create free account
hub / github.com/ZeeCoder/container-query / renderTestComponent

Function renderTestComponent

tests/utils/index.js:31–45  ·  view source on GitHub ↗
(
  component,
  size = { width: 100, height: 100 }
)

Source from the content-addressed store, hash-verified

29 * @return {HTMLElement}
30 */
31export const renderTestComponent = (
32 component,
33 size = { width: 100, height: 100 }
34) => {
35 root = document.createElement("div");
36 root.style.position = "relative";
37 changeRootSize(size);
38 document.body.appendChild(root);
39
40 ReactDOM.render(component, root);
41
42 componentElement = root.children[0];
43
44 return componentElement;
45};
46
47export const clearDOM = () => (document.body.innerHTML = "");
48

Callers 3

index.jsFile · 0.90
index.jsFile · 0.90
index.jsFile · 0.90

Calls 2

changeRootSizeFunction · 0.85
renderMethod · 0.45

Tested by

no test coverage detected