(synthesizedBy: string)
| 509 | |
| 510 | /** `Source -> target [kind] via @ file:line` for every template edge of one mechanism. */ |
| 511 | const templateEdges = (synthesizedBy: string) => |
| 512 | cg |
| 513 | .getNodesByKind('class') |
| 514 | .flatMap((c) => |
| 515 | cg |
| 516 | .getOutgoingEdgesFrom([c.id], ['calls', 'references']) |
| 517 | .filter((e) => (e.metadata as Record<string, unknown> | undefined)?.synthesizedBy === synthesizedBy) |
| 518 | .map((e) => { |
| 519 | const meta = e.metadata as Record<string, unknown>; |
| 520 | const target = cg.getNode(e.target)!; |
| 521 | return `${c.name} -> ${target.kind} ${target.name} [${e.kind}${meta.fnRef ? ' fnRef' : ''}] ${String(meta.via)} @ ${String(meta.registeredAt)}`; |
| 522 | }) |
| 523 | ) |
| 524 | .sort(); |
| 525 | |
| 526 | it("links each binding's own-member call — and a callable it only reads — to the component, at the binding's line", () => { |
| 527 | expect(templateEdges('angular-binding')).toEqual([ |
no test coverage detected