* A symbol counts as rendered only when its DECLARATION line is among the lines * the response actually sent — not when its name merely appears somewhere (it * shows up in the section header symbol list and in call sites regardless, which * is precisely how this defect hid for a whole epic).
(cg, response, names)
| 80 | * is precisely how this defect hid for a whole epic). |
| 81 | */ |
| 82 | function check(cg, response, names) { |
| 83 | const lines = renderedLines(response); |
| 84 | return names.map((name) => { |
| 85 | const node = (cg.getNodesByName?.(name) ?? []).find((n) => n.startLine > 0); |
| 86 | return { |
| 87 | name, |
| 88 | file: node?.filePath ?? '(not indexed)', |
| 89 | line: node?.startLine ?? 0, |
| 90 | rendered: !!node && lines.has(node.startLine), |
| 91 | }; |
| 92 | }); |
| 93 | } |
| 94 | |
| 95 | async function runCase(root, { query, symbols }) { |
| 96 | const cg = CodeGraph.openSync(root); |
no test coverage detected