MCPcopy
hub / github.com/angular/angular / recover

Function recover

packages/compiler/test/expression_parser/parser_spec.ts:1711–1714  ·  view source on GitHub ↗
(text: string, expected?: string)

Source from the content-addressed store, hash-verified

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;'));

Callers 1

parser_spec.tsFile · 0.85

Calls 3

validateFunction · 0.90
unparseFunction · 0.90
parseActionFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…