MCPcopy Create free account
hub / github.com/Effect-TS/effect / steps

Function steps

packages/ui/devtools/test/DevTools.test.ts:109–118  ·  view source on GitHub ↗
(root: HTMLElement)

Source from the content-addressed store, hash-verified

107const oldest = (root: HTMLElement, name: RegExp) => entry(root, name).at(-1)!
108
109const steps = (root: HTMLElement) =>
110 Array.from(root.querySelectorAll(".chain .step")).map((step) => ({
111 step,
112 kind: step.getAttribute("data-step")! +
113 (step.hasAttribute("data-index")
114 ? " " + step.getAttribute("data-index")
115 : ""),
116 what: text(step.querySelector(".what")),
117 args: text(step.querySelector(".args"))
118 }))
119
120const step = (root: HTMLElement, kind: string, what?: RegExp) => {
121 const found = steps(root).find((step) => step.kind === kind && (what === undefined || what.test(step.what)))

Callers 3

stepFunction · 0.85
DevTools.test.tsFile · 0.85
sessionFunction · 0.85

Calls 3

fromMethod · 0.80
textFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected