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

Function paths

__tests__/python-declared-import-roots.test.ts:353–359  ·  view source on GitHub ↗

The paths the configs `files` declare, in the order they are read.

(files: Record<string, string>)

Source from the content-addressed store, hash-verified

351describe('reading the declared import paths of one folder', () => {
352 /** The paths the configs `files` declare, in the order they are read. */
353 function paths(files: Record<string, string>): string[] | undefined {
354 const read = (
355 importResolver as unknown as { declaredPythonImportPaths?: (read: (name: string) => string | null) => string[] }
356 ).declaredPythonImportPaths;
357 expect(read, 'declaredPythonImportPaths').toBeTypeOf('function');
358 return read?.((name) => files[name] ?? null);
359 }
360
361 it('reads nothing where no file configures either tool', () => {
362 expect(paths({})).toEqual([]);

Calls 1

readFunction · 0.70

Tested by

no test coverage detected