feat(ivy): implement compileComponents
method for TestBedRender3
(#27778)
The implementation of the `compileComponents` method for `TestBedRender3` was missing. We now pass each component through `resolveComponentResources` when `TestBed.compileComponents` is called so that `templateUrl` and `styleUrls` can be resolved asynchronously and used once `TestBed.createComponent` is called. The component's metadata are overriden in `TestBed` instead of mutating the original metadata like this is the case outside of TestBed. The reason for that is that we need to ensure that we didn't mutate anything so that the following tests can run with the same original metadata, otherwise we it could trigger or hide some errors. FW-553 #resolve PR Close #27778
This commit is contained in:

committed by
Andrew Kushnir

parent
3a31a2795e
commit
29bff0f02e
@ -161,7 +161,9 @@ function bootstrap(
|
||||
afterEach(destroyPlatform);
|
||||
|
||||
// TODO(misko): can't use `fixmeIvy.it` because the `it` is somehow special here.
|
||||
fixmeIvy('FW-553: TestBed is unaware of async compilation').isEnabled &&
|
||||
fixmeIvy(
|
||||
'FW-876: Bootstrap factory method should throw if bootstrapped Directive is not a Component')
|
||||
.isEnabled &&
|
||||
it('should throw if bootstrapped Directive is not a Component',
|
||||
inject([AsyncTestCompleter], (done: AsyncTestCompleter) => {
|
||||
const logger = new MockConsole();
|
||||
@ -190,7 +192,8 @@ function bootstrap(
|
||||
}));
|
||||
|
||||
// TODO(misko): can't use `fixmeIvy.it` because the `it` is somehow special here.
|
||||
fixmeIvy('FW-553: TestBed is unaware of async compilation').isEnabled &&
|
||||
fixmeIvy('FW-875: The source of the error is missing in the `StaticInjectorError` message')
|
||||
.isEnabled &&
|
||||
it('should throw if no provider',
|
||||
inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
const logger = new MockConsole();
|
||||
|
Reference in New Issue
Block a user