MCPcopy Create free account
hub / github.com/FormidableLabs/react-live / bg

Function bg

packages/react-live/src/components/Editor/index.test.jsx:129–132  ·  view source on GitHub ↗
(theme)

Source from the content-addressed store, hash-verified

127 // jsdom normalises hex to rgb(), so compare two themes rather than
128 // asserting on a literal colour value.
129 const bg = (theme) =>
130 render(
131 <Editor code="const x = 1;" language="js" theme={theme} />,
132 ).container.querySelector("pre").style.backgroundColor;
133
134 expect(bg(themes.github)).not.toBe("");
135 expect(bg(themes.github)).not.toBe(bg(themes.nightOwl));

Callers 1

index.test.jsxFile · 0.85

Calls 1

renderFunction · 0.90

Tested by

no test coverage detected