Skip to content

Commit

Permalink
fix(ivy): update token used for fakeAsync test (angular#28383)
Browse files Browse the repository at this point in the history
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 angular#28196.

PR Close angular#28383
  • Loading branch information
AndrewKushnir authored and vetom committed Jan 31, 2019
1 parent 53dfbe1 commit 4d9a1a5
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions packages/core/test/fake_async_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand All @@ -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(() => {
Expand Down

0 comments on commit 4d9a1a5

Please sign in to comment.