
committed by
Miško Hevery

parent
19544060d3
commit
787c54736c
@ -5,8 +5,8 @@
|
||||
* 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 {ApplicationRef, Compiler, Component, ComponentFactory, ComponentRef, Injector, NgModule, Testability, TestabilityRegistry} from '@angular/core';
|
||||
import {TestBed, getTestBed, inject} from '@angular/core/testing';
|
||||
import {Compiler, Component, ComponentFactory, Injector, NgModule, TestabilityRegistry} from '@angular/core';
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
import * as angular from '@angular/upgrade/src/common/angular1';
|
||||
import {DowngradeComponentAdapter, groupNodesBySelector} from '@angular/upgrade/src/common/downgrade_component_adapter';
|
||||
|
||||
@ -82,6 +82,7 @@ withEachNg1Version(() => {
|
||||
let adapter: DowngradeComponentAdapter;
|
||||
let content: string;
|
||||
let compiler: Compiler;
|
||||
let registry: TestabilityRegistry;
|
||||
let element: angular.IAugmentedJQuery;
|
||||
|
||||
class mockScope implements angular.IScope {
|
||||
@ -168,15 +169,13 @@ withEachNg1Version(() => {
|
||||
componentFactory, wrapCallback);
|
||||
}
|
||||
|
||||
beforeEach((inject([Compiler], (inject_compiler: Compiler) => {
|
||||
compiler = inject_compiler;
|
||||
beforeEach(() => {
|
||||
compiler = TestBed.get(Compiler);
|
||||
registry = TestBed.get(TestabilityRegistry);
|
||||
adapter = getAdaptor();
|
||||
})));
|
||||
|
||||
afterEach(() => {
|
||||
let registry = TestBed.get(TestabilityRegistry);
|
||||
registry.unregisterAllApplications();
|
||||
});
|
||||
beforeEach(() => registry.unregisterAllApplications());
|
||||
afterEach(() => registry.unregisterAllApplications());
|
||||
|
||||
it('should add testabilities hook when creating components', () => {
|
||||
|
||||
|
Reference in New Issue
Block a user