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

Function method

__tests__/vue-options-api.test.ts:101–101  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

99 try {
100 const nodes = cg.getNodesInFile('src/views/login/index.vue');
101 const method = (name: string) => nodes.find((n) => n.kind === 'method' && n.name === name)!;
102 expect(nodes.filter((n) => n.kind === 'method').map((n) => n.name).sort()).toEqual(['data', 'handleLogin', 'validate']);
103 expect(method('handleLogin').qualifiedName).toBe('index::handleLogin');
104 // The call inside handleLogin is handleLogin's, not the file's.

Callers 2

wireMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected