refactor(testing): introduce new testing api to support ng modules

BREAKING CHANGE:
- deprecations:
  * `withProviders`, use `TestBed.withModule` instead
  * `addProviders`, use `TestBed.configureTestingModule` instead
  * `TestComponentBuilder`, use `TestBed.configureTestModule` / `TestBed.override...` / `TestBed.createComponent` instead.

Closes #10354
This commit is contained in:
Tobias Bosch
2016-07-28 04:54:49 -07:00
parent acc6c8d0b7
commit d0a95e35af
45 changed files with 1090 additions and 501 deletions

View File

@ -27,7 +27,7 @@ export function main() {
expect(ngModule.selector).toEqual('cmp');
});
it('should allow overriding the @NgModule', () => {
it('should allow overriding the @Directive', () => {
dirResolver.setDirective(
SomeComponent, new ComponentMetadata({selector: 'someOtherSelector'}));
var metadata = dirResolver.resolve(SomeComponent);