From 309ef0f354c0d1986a34644096e4892cc50b5a9e Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Thu, 4 Jun 2015 09:58:22 +0200 Subject: [PATCH] refactor(test): remove explicit calls to flushMicrotasks() flushMicrotasks() is now called at after the fakeAsync callback returns, see https://github.com/angular/angular/pull/2290 --- modules/angular2/test/forms/integration_spec.ts | 9 +-------- modules/angular2/test/forms/model_spec.ts | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/modules/angular2/test/forms/integration_spec.ts b/modules/angular2/test/forms/integration_spec.ts index 9c0c99a91e..456f480f42 100644 --- a/modules/angular2/test/forms/integration_spec.ts +++ b/modules/angular2/test/forms/integration_spec.ts @@ -422,7 +422,6 @@ export function main() { expect(ctx.name).toEqual("updatedValue"); }); - flushMicrotasks(); }))); it("should support ng-model for single fields", @@ -447,7 +446,6 @@ export function main() { expect(ctx.name).toEqual("updatedValue"); }); - flushMicrotasks(); }))); describe("template-driven forms", () => { @@ -473,7 +471,6 @@ export function main() { expect(form.controls['user']).toBeDefined(); expect(form.controls['user'].controls['login']).toBeDefined(); }); - flushMicrotasks(); }))); it("should not create a template-driven form when ng-no-form is used", @@ -489,7 +486,6 @@ export function main() { expect(view.rawView.elementInjectors.length).toEqual(0); }); - flushMicrotasks(); }))); it("should remove controls", inject([TestBed], fakeAsync(tb => { @@ -517,7 +513,6 @@ export function main() { expect(form.controls['login']).not.toBeDefined(); }); - flushMicrotasks(); }))); it("should remove control groups", @@ -574,7 +569,6 @@ export function main() { expect(ctx.name).toEqual("updatedValue"); }); - flushMicrotasks(); }))); @@ -697,7 +691,6 @@ export function main() { .toEqual(["ng-binding", "ng-touched", "ng-dirty", "ng-valid"]); tick(); }); - flushMicrotasks(); }))); }); }); @@ -734,4 +727,4 @@ class MyComp { mc.name = name; return mc; } -} \ No newline at end of file +} diff --git a/modules/angular2/test/forms/model_spec.ts b/modules/angular2/test/forms/model_spec.ts index 4ae481d36d..018df5dbd0 100644 --- a/modules/angular2/test/forms/model_spec.ts +++ b/modules/angular2/test/forms/model_spec.ts @@ -10,7 +10,6 @@ import { el, AsyncTestCompleter, fakeAsync, - flushMicrotasks, tick, inject } from 'angular2/test_lib';