(backend: 'kernel' | 'wasm', file: string, source: string, language: Language)
| 63 | }); |
| 64 | |
| 65 | function extract(backend: 'kernel' | 'wasm', file: string, source: string, language: Language): ExtractionResult { |
| 66 | if (backend === 'wasm') { |
| 67 | process.env.CODEGRAPH_KERNEL = '0'; |
| 68 | return extractFromSource(file, source, language); |
| 69 | } |
| 70 | delete process.env.CODEGRAPH_KERNEL; |
| 71 | process.env.CODEGRAPH_KERNEL_LANGS = 'all'; |
| 72 | const result = tryKernelExtract(file, source, language); |
| 73 | expect(result, `kernel extraction of ${file}`).not.toBeNull(); |
| 74 | return result!; |
| 75 | } |
| 76 | |
| 77 | const backends = kernelAvailable ? (['kernel', 'wasm'] as const) : (['wasm'] as const); |
| 78 |
no test coverage detected