MCPcopy
hub / github.com/benjitaylor/agentation / createElementWithFiber

Function createElementWithFiber

package/src/utils/react-detection.test.ts:41–52  ·  view source on GitHub ↗
(
  fiber: MockFiber,
  options: { className?: string } = {},
)

Source from the content-addressed store, hash-verified

39
40// Helper to create element with fiber attached
41function createElementWithFiber(
42 fiber: MockFiber,
43 options: { className?: string } = {},
44) {
45 const element = document.createElement("div");
46 if (options.className) {
47 element.className = options.className;
48 }
49 attachFiber(element, fiber);
50 document.body.appendChild(element);
51 return element;
52}
53
54describe("react-detection", () => {
55 beforeEach(() => {

Callers 1

Calls 1

attachFiberFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…