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 {discardPeriodicTasks, fakeAsync, flush, flushMicrotasks, tick} from '@angular/core/testing';
|
||||||
import {Log, beforeEach, describe, inject, it} from '@angular/core/testing/src/testing_internal';
|
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 {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 resolvedPromise = Promise.resolve(null);
|
||||||
const ProxyZoneSpec: {assertPresent: () => void} = (Zone as any)['ProxyZoneSpec'];
|
const ProxyZoneSpec: {assertPresent: () => void} = (Zone as any)['ProxyZoneSpec'];
|
||||||
|
@ -33,10 +30,9 @@ const ProxyZoneSpec: {assertPresent: () => void} = (Zone as any)['ProxyZoneSpec'
|
||||||
})('foo', 'bar');
|
})('foo', 'bar');
|
||||||
});
|
});
|
||||||
|
|
||||||
fixmeIvy('FW-806: Ivy\'s TestBed implementation doesn\'t inject compiler-related tokens')
|
it('should work with inject()',
|
||||||
.it('should work with inject()',
|
fakeAsync(inject([EventManager], (eventManager: EventManager) => {
|
||||||
fakeAsync(inject([Parser], (parser: any /** TODO #9100 */) => {
|
expect(eventManager).toBeAnInstanceOf(EventManager);
|
||||||
expect(parser).toBeAnInstanceOf(Parser);
|
|
||||||
})));
|
})));
|
||||||
|
|
||||||
it('should throw on nested calls', () => {
|
it('should throw on nested calls', () => {
|
||||||
|
|
Loading…
Reference in New Issue