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
This commit is contained in:
parent
778d5739e2
commit
495a9dd445
|
@ -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(() => {
|
||||
|
|
Loading…
Reference in New Issue