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

Function context

__tests__/codeigniter.test.ts:86–91  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

84
85describe('detecting a CodeIgniter project', () => {
86 const context = (files: Record<string, string>): ResolutionContext =>
87 ({
88 fileExists: (f: string) => f in files,
89 getAllFiles: () => Object.keys(files),
90 readFile: (f: string) => files[f] ?? null,
91 }) as unknown as ResolutionContext;
92
93 it('goes by the framework\'s own file, or by a routes file that names a default controller', () => {
94 expect(codeigniterResolver.detect(context({ 'system/core/CodeIgniter.php': '' }))).toBe(true);

Calls

no outgoing calls

Tested by

no test coverage detected