test(ivy): update root causes for @angular/core tests (#27961)

PR Close #27961
This commit is contained in:
Pawel Kozlowski 2019-01-07 17:29:24 +01:00 committed by Kara Erickson
parent e08feb7e54
commit 45880532bf
2 changed files with 76 additions and 81 deletions

View File

@ -1149,8 +1149,7 @@ function declareTests(config?: {useJit: boolean}) {
expect(compRef.instance.someToken).toBe('someRootValue'); expect(compRef.instance.someToken).toBe('someRootValue');
}); });
fixmeIvy('FW-707: TestBed: No LView in getParentInjectorLocation') it('should create a component with the passed NgModuleRef', () => {
.it('should create a component with the passed NgModuleRef', () => {
@Component({template: ''}) @Component({template: ''})
class RootComp { class RootComp {
constructor(public vc: ViewContainerRef) {} constructor(public vc: ViewContainerRef) {}
@ -1173,13 +1172,11 @@ function declareTests(config?: {useJit: boolean}) {
class MyModule { class MyModule {
} }
const compFixture = TestBed.configureTestingModule({imports: [RootModule]}) const compFixture =
.createComponent(RootComp); TestBed.configureTestingModule({imports: [RootModule]}).createComponent(RootComp);
const compiler = <Compiler>TestBed.get(Compiler); const compiler = <Compiler>TestBed.get(Compiler);
const myModule = const myModule = compiler.compileModuleSync(MyModule).create(TestBed.get(NgModuleRef));
compiler.compileModuleSync(MyModule).create(TestBed.get(NgModuleRef)); const myCompFactory = (<ComponentFactoryResolver>TestBed.get(ComponentFactoryResolver))
const myCompFactory =
(<ComponentFactoryResolver>TestBed.get(ComponentFactoryResolver))
.resolveComponentFactory(MyComp); .resolveComponentFactory(MyComp);
// Note: MyComp was declared as entryComponent in the RootModule, // Note: MyComp was declared as entryComponent in the RootModule,
@ -1190,8 +1187,7 @@ function declareTests(config?: {useJit: boolean}) {
expect(compRef.instance.someToken).toBe('someValue'); expect(compRef.instance.someToken).toBe('someValue');
}); });
fixmeIvy('FW-707: TestBed: No LView in getParentInjectorLocation') it('should create a component with the NgModuleRef of the ComponentFactoryResolver',
.it('should create a component with the NgModuleRef of the ComponentFactoryResolver',
() => { () => {
@Component({template: ''}) @Component({template: ''})
class RootComp { class RootComp {

View File

@ -32,8 +32,7 @@ function declareTests(config?: {useJit: boolean}) {
describe('platform pipes', () => { describe('platform pipes', () => {
beforeEach(() => { TestBed.configureCompiler({...config}); }); beforeEach(() => { TestBed.configureCompiler({...config}); });
fixmeIvy('FW-798: Handle pipes with duplicate names') it('should overwrite them by custom pipes', () => {
.it('should overwrite them by custom pipes', () => {
TestBed.configureTestingModule({declarations: [CustomPipe]}); TestBed.configureTestingModule({declarations: [CustomPipe]});
const template = '{{true | somePipe}}'; const template = '{{true | somePipe}}';
TestBed.overrideComponent(MyComp1, {set: {template}}); TestBed.overrideComponent(MyComp1, {set: {template}});