MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / refs

Function refs

__tests__/drupal-services.test.ts:17–21  ·  view source on GitHub ↗
(source: string, service: string)

Source from the content-addressed store, hash-verified

15describe('a services file', () => {
16 const file = 'modules/shop/shop.services.yml';
17 const refs = (source: string, service: string): string[] => {
18 const { nodes, references } = extract(file, source);
19 const node = nodes.find((n) => n.name === `service:${service}`)!;
20 return references.filter((r) => r.fromNodeId === node.id).map((r) => r.referenceName);
21 };
22
23 it('makes a node per service, named by its id, with its class', () => {
24 const { nodes } = extract(file, `services:

Callers 1

Calls 2

mapMethod · 0.80
extractFunction · 0.70

Tested by

no test coverage detected