fix(compiler): TestBed.overrideProvider should keep imported NgModules eager (#19624)

Before, as soon as a user called `TestBed.overrideProvider` for a provider
of a `NgModule` that was imported via `TestBed.configureTestingModule`,
that `NgModule` became lazy.

This commit changes this behavior to keep the `NgModule` eager,
with or without a call to `TestBed.overrideProvider`.

PR Close #19624
This commit is contained in:
Tobias Bosch
2017-10-04 09:13:22 -07:00
committed by Chuck Jazdzewski
parent dfa0973563
commit b0befd7376
4 changed files with 65 additions and 12 deletions

View File

@ -467,7 +467,7 @@ export class TestBed implements Injector {
}
return [depFlags, depToken];
});
overrideProvider({token, flags, deps, value});
overrideProvider({token, flags, deps, value, deprecatedBehavior: deprecated});
}
createComponent<T>(component: Type<T>): ComponentFixture<T> {