The loop headers at the site, outermost first, as ` `.
(src: string, needle: string, language: Language)
| 338 | describe('loops a site is written inside', () => { |
| 339 | /** The loop headers at the site, outermost first, as `<kind> <text>`. */ |
| 340 | async function loopsAt(src: string, needle: string, language: Language) { |
| 341 | const line = lineOf(src, needle); |
| 342 | const column = src.split('\n')[line - 1]!.indexOf(needle); |
| 343 | return (await loopsInSource(src, language, line, column)).map((l) => `${l.kind} ${l.text}`); |
| 344 | } |
| 345 | |
| 346 | it('reads a JS for-of and a while', async () => { |
| 347 | const src = ` |
no test coverage detected