fix(ivy): stub TestBed.compileComponents implementation (#26506)

PR Close #26506
This commit is contained in:
Pawel Kozlowski 2018-10-17 13:46:05 +02:00 committed by Miško Hevery
parent 65b209359a
commit f8195e5e3d
2 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,18 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {TestBed} from '@angular/core/testing/src/test_bed';
import {AsyncTestCompleter, ddescribe, describe, inject, it} from '@angular/core/testing/src/testing_internal';
describe('TestBed with async processing', () => {
beforeEach(() => { TestBed.resetTestingModule(); });
it('should allow injecting AsyncTestCompleter',
inject([AsyncTestCompleter], (async: AsyncTestCompleter) => { async.done(); }));
});

View File

@ -270,9 +270,10 @@ export class TestBedRender3 implements Injector, TestBed {
}
}
// TODO(vicb): implement
compileComponents(): Promise<any> {
throw new Error('Render3TestBed.compileComponents is not implemented yet');
// assume for now that components don't use templateUrl / stylesUrl to unblock further testing
// TODO(pk): plug into the ivy's resource fetching pipeline
return Promise.resolve();
}
get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {