fix(ivy): add support for providers in TestBed.configureCompiler (#27066)
Adds support for the `providers` that are passed in through `TestBed.configureCompiler` and scopes the error only if the consumer has passed in `useJit`. PR Close #27066
This commit is contained in:
parent
095b6e8113
commit
5247594e86
@ -251,7 +251,13 @@ export class TestBedRender3 implements Injector, TestBed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configureCompiler(config: {providers?: any[]; useJit?: boolean;}): void {
|
configureCompiler(config: {providers?: any[]; useJit?: boolean;}): void {
|
||||||
throw new Error('the Render3 compiler is not configurable !');
|
if (config.useJit != null) {
|
||||||
|
throw new Error('the Render3 compiler JiT mode is not configurable !');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config.providers) {
|
||||||
|
this._providerOverrides.push(...config.providers);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configureTestingModule(moduleDef: TestModuleMetadata): void {
|
configureTestingModule(moduleDef: TestModuleMetadata): void {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user