(options: Partial<ParseOptions>, text: string, ...aa: TestData[])
| 12 | } |
| 13 | |
| 14 | async function doExpect(options: Partial<ParseOptions>, text: string, ...aa: TestData[]) { |
| 15 | const { treeObject } = await parseAndFormat(text, { |
| 16 | ...options, |
| 17 | kind: "main", |
| 18 | }); |
| 19 | const tree = Tree.fromObject(treeObject); |
| 20 | |
| 21 | expect(tree.hasError()).toEqual(false); |
| 22 | expectOffsetAndText(tree, aa); |
| 23 | expectFindNodeAtOffset(tree, aa); |
| 24 | } |
| 25 | |
| 26 | function expectOffsetAndText(tree: Tree, aa: TestData[]) { |
| 27 | for (const { id, offset, length, boundOffset, boundLength } of aa) { |
no test coverage detected