
An @NgModule with invalid provider declarations produces errors under normal circumstances. However, within the TestBed two small issues with provider overrides interfered with the correct production of these errors: 1. a 'null' provider object caused a premature crash when the TestBed attempted to check for a 'provide' property on it with hasOwnProperty(). 2. the array of providers would have an empty override array appended to it for each input provider, which would pollute the error messages produced down the line. This commit fixes both of these issues, by 1) checking for null and 2) filtering out the empty override arrays. Testing strategy: future commits change the way the TestBed compiles modules, causing tests to become sensitive to this bug if not fixed. PR Close #28033
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
86.3%
JavaScript
8.5%
HTML
1.8%
Starlark
1.7%
CSS
1%
Other
0.6%