fix(upgrade): ensure downgraded components are destroyed in the Angular zone

This commit is contained in:
George Kalpakas
2017-09-25 12:39:51 +03:00
committed by Alex Rickabaugh
parent 745b59f49c
commit 4e6aa9c2db
3 changed files with 42 additions and 4 deletions

View File

@ -122,7 +122,7 @@ export function main() {
let $compile = undefined as any;
let $parse = undefined as any;
let componentFactory: ComponentFactory<any>; // testbed
let wrapCallback = undefined as any;
let wrapCallback = (cb: any) => cb;
content = `
<h1> new component </h1>
@ -183,7 +183,7 @@ export function main() {
expect(registry.getAllTestabilities().length).toEqual(0);
adapter.createComponent([]);
expect(registry.getAllTestabilities().length).toEqual(1);
adapter.registerCleanup(true);
adapter.registerCleanup();
element.remove !();
expect(registry.getAllTestabilities().length).toEqual(0);
});