Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions packages/core/test/test_bed_async_spec.ts
@@ -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(); }));
});
5 changes: 3 additions & 2 deletions packages/core/testing/src/r3_test_bed.ts
Expand Up @@ -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 {
Expand Down