fix(compiler-cli): only use error collector when needed. (#19912)
The error collector changes behavior of the metadata resolver in ways that haven't been fully hardened. This changes limits its use to the lazy route detection and the language service. Issue: #19906 PR Close #19912
This commit is contained in:

committed by
Matias Niemelä

parent
c92efc15fb
commit
7bfeac746e
@ -1424,11 +1424,8 @@ describe('ngc transformer command-line', () => {
|
||||
const messages: string[] = [];
|
||||
const exitCode =
|
||||
main(['-p', path.join(basePath, 'src/tsconfig.json')], message => messages.push(message));
|
||||
expect(exitCode).toBe(1, 'Compile was expected to fail');
|
||||
expect(messages).toEqual([
|
||||
'Error: Error: Error encountered resolving symbol values statically. Tagged template expressions are not supported in metadata (position 3:27 in the original .ts file)\n' +
|
||||
'Error: No template specified for component TestComponent\n'
|
||||
]);
|
||||
expect(exitCode).toBe(2, 'Compile was expected to fail');
|
||||
expect(messages[0]).toContain(['Tagged template expressions are not supported in metadata']);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user