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