test(ivy): turn on passing tests in platform-browser-dynamic (#28307)
PR Close #28307
This commit is contained in:
parent
f9b103825a
commit
317cc922ac
@ -12,7 +12,6 @@ import {TestBed, async, fakeAsync, tick} from '@angular/core/testing';
|
|||||||
import {CachedResourceLoader} from '@angular/platform-browser-dynamic/src/resource_loader/resource_loader_cache';
|
import {CachedResourceLoader} from '@angular/platform-browser-dynamic/src/resource_loader/resource_loader_cache';
|
||||||
import {setTemplateCache} from '@angular/platform-browser-dynamic/test/resource_loader/resource_loader_cache_setter';
|
import {setTemplateCache} from '@angular/platform-browser-dynamic/test/resource_loader/resource_loader_cache_setter';
|
||||||
import {expect} from '@angular/platform-browser/testing/src/matchers';
|
import {expect} from '@angular/platform-browser/testing/src/matchers';
|
||||||
import {fixmeIvy} from '@angular/private/testing';
|
|
||||||
|
|
||||||
if (isBrowser) {
|
if (isBrowser) {
|
||||||
describe('CachedResourceLoader', () => {
|
describe('CachedResourceLoader', () => {
|
||||||
@ -54,8 +53,7 @@ if (isBrowser) {
|
|||||||
.catch((error) => {/** success */});
|
.catch((error) => {/** success */});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
fixmeIvy('FW-553: TestBed is unaware of async compilation')
|
it('should allow fakeAsync Tests to load components with templateUrl synchronously',
|
||||||
.it('should allow fakeAsync Tests to load components with templateUrl synchronously',
|
|
||||||
fakeAsync(() => {
|
fakeAsync(() => {
|
||||||
TestBed.configureTestingModule({declarations: [TestComponent]});
|
TestBed.configureTestingModule({declarations: [TestComponent]});
|
||||||
TestBed.compileComponents();
|
TestBed.compileComponents();
|
||||||
|
@ -11,7 +11,6 @@ import {Compiler, Component, NgModule} from '@angular/core';
|
|||||||
import {TestBed, async, fakeAsync, inject, tick} from '@angular/core/testing';
|
import {TestBed, async, fakeAsync, inject, tick} from '@angular/core/testing';
|
||||||
|
|
||||||
import {ResourceLoaderImpl} from '@angular/platform-browser-dynamic/src/resource_loader/resource_loader_impl';
|
import {ResourceLoaderImpl} from '@angular/platform-browser-dynamic/src/resource_loader/resource_loader_impl';
|
||||||
import {fixmeIvy} from '@angular/private/testing';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -116,8 +115,7 @@ if (isBrowser) {
|
|||||||
|
|
||||||
const restoreJasmineIt = () => { jasmine.getEnv().it = originalJasmineIt; };
|
const restoreJasmineIt = () => { jasmine.getEnv().it = originalJasmineIt; };
|
||||||
|
|
||||||
fixmeIvy('FW-553: TestBed is unaware of async compilation')
|
it('should fail when an ResourceLoader fails', done => {
|
||||||
.it('should fail when an ResourceLoader fails', done => {
|
|
||||||
const itPromise = patchJasmineIt();
|
const itPromise = patchJasmineIt();
|
||||||
|
|
||||||
it('should fail with an error from a promise', async(() => {
|
it('should fail with an error from a promise', async(() => {
|
||||||
@ -137,14 +135,12 @@ if (isBrowser) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('TestBed createComponent', function() {
|
describe('TestBed createComponent', function() {
|
||||||
fixmeIvy('FW-553: TestBed is unaware of async compilation')
|
it('should allow an external templateUrl', async(() => {
|
||||||
.it('should allow an external templateUrl', async(() => {
|
|
||||||
TestBed.configureTestingModule({declarations: [ExternalTemplateComp]});
|
TestBed.configureTestingModule({declarations: [ExternalTemplateComp]});
|
||||||
TestBed.compileComponents().then(() => {
|
TestBed.compileComponents().then(() => {
|
||||||
const componentFixture = TestBed.createComponent(ExternalTemplateComp);
|
const componentFixture = TestBed.createComponent(ExternalTemplateComp);
|
||||||
componentFixture.detectChanges();
|
componentFixture.detectChanges();
|
||||||
expect(componentFixture.nativeElement.textContent)
|
expect(componentFixture.nativeElement.textContent).toEqual('from external template');
|
||||||
.toEqual('from external template');
|
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
10000); // Long timeout here because this test makes an actual ResourceLoader
|
10000); // Long timeout here because this test makes an actual ResourceLoader
|
||||||
|
Loading…
x
Reference in New Issue
Block a user