MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / dropEmpty

Function dropEmpty

lib/aria.js:119–126  ·  view source on GitHub ↗
(nodes)

Source from the content-addressed store, hash-verified

117// ─────────────────────────────────────────────────────────────────
118
119function dropEmpty(nodes) {
120 return nodes.flatMap(node => {
121 const children = dropEmpty(node.children)
122 if (INTERACTIVE_ROLES.has(node.role)) return [{ ...node, children }]
123 if (children.length > 0) return [{ ...node, children }]
124 return []
125 })
126}
127
128// ─────────────────────────────────────────────────────────────────
129// STEP 3 · Render: AriaNode[] → indented YAML text

Callers 2

compactAriaSnapshotFunction · 0.85
summariesOfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected