(text: string, expected?: string)
| 1709 | |
| 1710 | describe('error recovery', () => { |
| 1711 | function recover(text: string, expected?: string) { |
| 1712 | const expr = validate(parseAction(text)); |
| 1713 | expect(unparse(expr)).toEqual(expected || text); |
| 1714 | } |
| 1715 | it('should be able to recover from an extra paren', () => recover('((a)))', '((a))')); |
| 1716 | it('should be able to recover from an extra bracket', () => recover('[[a]]]', '[[a]]')); |
| 1717 | it('should be able to recover from a missing )', () => recover('(a;b', '(a); b;')); |
no test coverage detected
searching dependent graphs…