From 495a9dd4450a3675058e8236caf83776a4c7fefb Mon Sep 17 00:00:00 2001 From: Andrew Kushnir Date: Fri, 25 Jan 2019 16:00:50 -0800 Subject: [PATCH] fix(ivy): update token used for fakeAsync test (#28383) This commit updates the token used in fakeAsync test to the one available in both VE and R3 TestBeds. The goal of the test is to verify that fakeAsync works with inject function, so the actual token that is used for a test is irrelevant in that case. The logic to retrieve tokens from compiler injector (that the comment in "fixmeIvy" refers to) was implemented in PR #28196. PR Close #28383 --- packages/core/test/fake_async_spec.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/core/test/fake_async_spec.ts b/packages/core/test/fake_async_spec.ts index c98498fd22..ffbaeb82a6 100644 --- a/packages/core/test/fake_async_spec.ts +++ b/packages/core/test/fake_async_spec.ts @@ -8,11 +8,8 @@ import {discardPeriodicTasks, fakeAsync, flush, flushMicrotasks, tick} from '@angular/core/testing'; import {Log, beforeEach, describe, inject, it} from '@angular/core/testing/src/testing_internal'; +import {EventManager} from '@angular/platform-browser'; import {expect} from '@angular/platform-browser/testing/src/matchers'; -import {fixmeIvy} from '@angular/private/testing'; - -import {Parser} from '../../compiler/src/expression_parser/parser'; - const resolvedPromise = Promise.resolve(null); const ProxyZoneSpec: {assertPresent: () => void} = (Zone as any)['ProxyZoneSpec']; @@ -33,11 +30,10 @@ const ProxyZoneSpec: {assertPresent: () => void} = (Zone as any)['ProxyZoneSpec' })('foo', 'bar'); }); - fixmeIvy('FW-806: Ivy\'s TestBed implementation doesn\'t inject compiler-related tokens') - .it('should work with inject()', - fakeAsync(inject([Parser], (parser: any /** TODO #9100 */) => { - expect(parser).toBeAnInstanceOf(Parser); - }))); + it('should work with inject()', + fakeAsync(inject([EventManager], (eventManager: EventManager) => { + expect(eventManager).toBeAnInstanceOf(EventManager); + }))); it('should throw on nested calls', () => { expect(() => {