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

Function ancestors

__tests__/cpp-base-class-lookup.test.ts:506–507  ·  view source on GitHub ↗
(qualifiedName: string, file: string)

Source from the content-addressed store, hash-verified

504
505 it('shows the real ancestors in the type hierarchy', () => {
506 const ancestors = (qualifiedName: string, file: string): string[] =>
507 (buildTypeHierarchy(cg, node(qualifiedName, file))?.ancestors ?? []).map((a) => `${a.relation} ${a.node.qualifiedName} (${a.node.filePath})`);
508 expect(ancestors('google::protobuf::DynamicMessage', 'src/google/protobuf/dynamic_message.cc')).toEqual([
509 'extends google::protobuf::Message (src/google/protobuf/message.h)',
510 ]);

Callers 1

Calls 3

buildTypeHierarchyFunction · 0.90
mapMethod · 0.80
nodeFunction · 0.70

Tested by

no test coverage detected