MCPcopy Create free account
hub / github.com/angular/angular / recover

Function recover

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

Source from the content-addressed store, hash-verified

1961
1962 describe('error recovery', () => {
1963 function recover(text: string, expected?: string) {
1964 const expr = validate(parseAction(text));
1965 expect(unparse(expr)).toEqual(expected || text);
1966 }
1967 it('should be able to recover from an extra paren', () => recover('((a)))', '((a))'));
1968 it('should be able to recover from an extra bracket', () => recover('[[a]]]', '[[a]]'));
1969 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