DelegatingReflectionHost
for testing NgccReflectionHost
s (#36284)
In #36089, `DelegatingReflectionHost` was introduced. Under the hood, it delegates another `NgccReflectionHost` in order to reflect over the program's source files, while using a different TypeScript `ReflectionHost` to reflect over `.d.ts` files (which is how external dependencies are represented in the program). Previously, the `NgccReflectionHost`s were used directly in tests. This does not exercise them in the way they are exercised in the actual program, because (when used directly) they will also reflect on `.d.ts` files too (instead of delegating to the TypeScript `ReflectionHost`). This could hide bugs that would happen on the actual program. This commit fixes this by using the `DelegatingReflectionHost` in the various `NgccReflectionHost` tests. NOTE: This change will cause some of the existing tests to start failing. These failures demonstrate pre-existing bugs in ngcc, that were hidden due to the tests' being inconsistent with how the `ReflectionHost`s are used in the actual program. They will be fixed in the next commit. PR Close #36284
Angular
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages.
Quickstart
Changelog
Learn about the latest improvements.
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.
Description
Languages
TypeScript
68.6%
HTML
12.8%
JavaScript
8.4%
Pug
7%
Starlark
1.4%
Other
1.7%