(files: Record<string, string>)
| 84 | |
| 85 | describe('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); |
no outgoing calls
no test coverage detected