angular/packages/core/testing/src
Kristiyan Kostadinov 886cf6c452 fix(core): unable to inject viewProviders when host directive with providers is present
When registering providers, the DI system assumes that `viewProviders` are registered before plain `providers`. This was reinforced by components always being first in the array of directive matches, only one component being allowed per node and the fact that only components can have `viewProviders`.

This breaks down if there are host directives with `providers` on the component, because they'll execute earlier, throwing off the order of operations.

These changes fix the issue by separating out the resolvers for `viewProviders` and plain `providers` and explicitly running the component's `viewProviders` resolver before any others. This also has the benefit of not attempting to resolve `viewProviders` for directives which are guaranteed not to have them.

Fixes #65724.
2025-12-03 15:09:48 +01:00
..
application_error_handler.ts refactor(core): Instantiate the ErrorHandler lazily. (#58984) 2025-04-02 19:20:50 +00:00
async.ts docs: set syntax highlighting of code examples MD code blocks (#59026) 2024-12-04 17:30:28 +01:00
component_fixture.ts fix(core): Explicit Zone CD in TestBed providers should not override TestBed error handler (#63404) 2025-09-02 09:26:44 -07:00
defer.ts docs: rename @nodoc to @docs-private (#61194) 2025-05-09 10:23:00 -07:00
fake_async.ts docs: add callout on zone base testing helpers 2025-11-24 13:27:46 -05:00
logger.ts refactor(core): convert scripts within packages/core/testing to relative imports (#60232) 2025-03-27 18:29:35 +00:00
metadata_override.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
metadata_overrider.ts refactor(core): convert scripts within packages/core/testing to relative imports (#60232) 2025-03-27 18:29:35 +00:00
resolvers.ts refactor(core): convert scripts within packages/core/testing to relative imports (#60232) 2025-03-27 18:29:35 +00:00
styling.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
test_bed.ts refactor(core): add configurable behavior for animations to testbed (#62764) 2025-07-29 09:49:35 +00:00
test_bed_common.ts docs: animationsEnabled defaults to false (#63262) 2025-08-20 08:25:26 +00:00
test_bed_compiler.ts fix(core): unable to inject viewProviders when host directive with providers is present 2025-12-03 15:09:48 +01:00
test_hooks.ts refactor(core): remove private __core_private_testing_placeholder__ API (#61055) 2025-04-30 12:37:39 -07:00
testing.ts feat(core): support bindings in TestBed (#62040) 2025-06-17 11:49:27 +02:00
testing_internal.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
testing_private_export.ts refactor(core): expose getCleanupHook via private exports (#61017) 2025-04-29 10:30:17 -07:00