(node: Node)
| 11 | expect(tree.toJSON()).toEqual(JSON.parse(expected)); |
| 12 | |
| 13 | const check = (node: Node) => { |
| 14 | expect(node.id.startsWith(rootMarker)).toEqual(true); |
| 15 | if (!isIterable(node)) { |
| 16 | expect(tree.text.substring(node.offset, node.offset + node.length)).toEqual(getRawValue(node)); |
| 17 | } |
| 18 | tree.mapChildren(node, (child) => check(child)); |
| 19 | }; |
| 20 | |
| 21 | check(tree.root()); |
| 22 | } |
no test coverage detected