diff --git a/modules/angular2/test/testing/testing_public_spec.ts b/modules/angular2/test/testing/testing_public_spec.ts index 4f1f65cf19..df630c2f24 100644 --- a/modules/angular2/test/testing/testing_public_spec.ts +++ b/modules/angular2/test/testing/testing_public_spec.ts @@ -6,6 +6,7 @@ import { ddescribe, xdescribe, expect, + fakeAsync, tick, beforeEach, inject, @@ -169,6 +170,14 @@ export function main() { (value) => { expect(value).toEqual('async value'); }); })); + it('should allow the use of fakeAsync', + inject([FancyService], fakeAsync((service) => { + var value; + service.getAsyncValue().then(function(val) { value = val; }); + tick(); + expect(value).toEqual('async value'); + }))); + describe('using beforeEach', () => { beforeEach(inject([FancyService], (service) => { service.value = 'value modified in beforeEach'; }));