(backend: 'kernel' | 'wasm', source: string)
| 157 | }); |
| 158 | |
| 159 | function extract(backend: 'kernel' | 'wasm', source: string): ExtractionResult { |
| 160 | if (backend === 'wasm') { |
| 161 | process.env.CODEGRAPH_KERNEL = '0'; |
| 162 | return extractFromSource('main.go', source, 'go'); |
| 163 | } |
| 164 | delete process.env.CODEGRAPH_KERNEL; |
| 165 | process.env.CODEGRAPH_KERNEL_LANGS = 'all'; |
| 166 | const result = tryKernelExtract('main.go', source, 'go'); |
| 167 | expect(result, 'kernel extraction of main.go').not.toBeNull(); |
| 168 | return result!; |
| 169 | } |
| 170 | |
| 171 | const backends = kernelAvailable ? (['kernel', 'wasm'] as const) : (['wasm'] as const); |
| 172 |
no test coverage detected