(backend: 'kernel' | 'wasm', file: string, source: string, language: Language)
| 166 | }); |
| 167 | |
| 168 | function extract(backend: 'kernel' | 'wasm', file: string, source: string, language: Language): ExtractionResult { |
| 169 | if (backend === 'wasm') { |
| 170 | process.env.CODEGRAPH_KERNEL = '0'; |
| 171 | return extractFromSource(file, source, language); |
| 172 | } |
| 173 | delete process.env.CODEGRAPH_KERNEL; |
| 174 | process.env.CODEGRAPH_KERNEL_LANGS = 'all'; |
| 175 | const result = tryKernelExtract(file, source, language); |
| 176 | expect(result, `kernel extraction of ${file}`).not.toBeNull(); |
| 177 | return result!; |
| 178 | } |
| 179 | |
| 180 | /** `caller kind callee` for every call and `new` the file records, by its caller's qualified name. */ |
| 181 | function callsOf(result: ExtractionResult): string[] { |
no test coverage detected