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:
@ -9,7 +9,7 @@
|
||||
import {NgFor, NgIf} from '@angular/common';
|
||||
import {Control, ControlGroup, ControlValueAccessor, DeprecatedFormsModule, NG_ASYNC_VALIDATORS, NG_VALIDATORS, NgControl, NgForm, RadioButtonState, Validator, Validators} from '@angular/common/src/forms-deprecated';
|
||||
import {Component, Directive, EventEmitter, Input, Output, Provider, forwardRef} from '@angular/core';
|
||||
import {ComponentFixture, TestComponentBuilder, configureModule, fakeAsync, flushMicrotasks, tick} from '@angular/core/testing';
|
||||
import {ComponentFixture, TestBed, TestComponentBuilder, fakeAsync, flushMicrotasks, tick} from '@angular/core/testing';
|
||||
import {AsyncTestCompleter, afterEach, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
|
||||
import {By} from '@angular/platform-browser/src/dom/debug/by';
|
||||
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||
@ -22,7 +22,7 @@ import {PromiseWrapper} from '../../src/facade/promise';
|
||||
export function main() {
|
||||
describe('integration tests', () => {
|
||||
|
||||
beforeEach(() => configureModule({imports: [DeprecatedFormsModule]}));
|
||||
beforeEach(() => TestBed.configureTestingModule({imports: [DeprecatedFormsModule]}));
|
||||
|
||||
it('should initialize DOM elements with the given form object',
|
||||
inject(
|
||||
|
Reference in New Issue
Block a user