MCPcopy Create free account
hub / github.com/atomicojs/atomico / toggle

Function toggle

src/tests/render.test.js:169–174  ·  view source on GitHub ↗
(toggle)

Source from the content-addressed store, hash-verified

167 const host = document.createElement("div");
168
169 function toggle(toggle) {
170 const ref = {};
171 const tag = toggle ? "span" : "h1";
172 render(html`<host>${html`<${toggle} ref=${ref} />`}</host>`, host);
173 expect(host.querySelector(toggle)).to.equal(ref.current);
174 }
175
176 let length = 10;
177 let current;

Callers 1

render.test.jsFile · 0.85

Calls 2

renderFunction · 0.90
htmlFunction · 0.90

Tested by

no test coverage detected