From f5471107d94a5a2ec9d024e076cc4f1a4882013f Mon Sep 17 00:00:00 2001 From: Andrew Kushnir Date: Mon, 7 Jan 2019 17:26:23 -0800 Subject: [PATCH] test(ivy): root causes update for 'platform-browser-dynamic' and i18n tests (#27972) PR Close #27972 --- packages/core/test/i18n_integration_spec.ts | 21 ++++++----- .../test/testing_public_browser_spec.ts | 35 ++++++++++--------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/packages/core/test/i18n_integration_spec.ts b/packages/core/test/i18n_integration_spec.ts index 0c13466735..a6087e252b 100644 --- a/packages/core/test/i18n_integration_spec.ts +++ b/packages/core/test/i18n_integration_spec.ts @@ -451,18 +451,17 @@ onlyInIvy('Ivy i18n logic').describe('i18n', function() { expect(element).toHaveText('vingt - deux'); }); - fixmeIvy('FW-908: ICUs inside s throw an error at runtime') - .it('should handle ICUs inside ', () => { - const template = ` - - {age, select, 10 {ten} 20 {twenty} other {other}} - - `; - const fixture = getFixtureWithOverrides({template}); + it('should handle ICUs inside ', () => { + const template = ` + + {age, select, 10 {ten} 20 {twenty} other {other}} + + `; + const fixture = getFixtureWithOverrides({template}); - const element = fixture.nativeElement; - expect(element.innerHTML).toBe('vingt'); - }); + const element = fixture.nativeElement; + expect(element).toHaveText('vingt'); + }); fixmeIvy('FW-909: ICUs inside s throw errors at runtime') .it('should handle ICUs inside ', () => { diff --git a/packages/platform-browser-dynamic/test/testing_public_browser_spec.ts b/packages/platform-browser-dynamic/test/testing_public_browser_spec.ts index dd78da3ba2..7c78407d4d 100644 --- a/packages/platform-browser-dynamic/test/testing_public_browser_spec.ts +++ b/packages/platform-browser-dynamic/test/testing_public_browser_spec.ts @@ -63,11 +63,11 @@ if (isBrowser) { {providers: [{provide: FancyService, useValue: new FancyService()}]}); }); - fixmeIvy('unknown').it( - 'provides a real ResourceLoader instance', - inject([ResourceLoader], (resourceLoader: ResourceLoader) => { - expect(resourceLoader instanceof ResourceLoaderImpl).toBeTruthy(); - })); + fixmeIvy('FW-919: TestBed.get should be able to retrieve tokens from Compiler\'s injector') + .it('provides a real ResourceLoader instance', + inject([ResourceLoader], (resourceLoader: ResourceLoader) => { + expect(resourceLoader instanceof ResourceLoaderImpl).toBeTruthy(); + })); it('should allow the use of fakeAsync', fakeAsync(inject([FancyService], (service: any /** TODO #9100 */) => { @@ -80,19 +80,20 @@ if (isBrowser) { }); describe('Compiler', () => { - fixmeIvy('unknown').it('should return NgModule id when asked', () => { - @NgModule({ - id: 'test-module', - }) - class TestModule { - } + fixmeIvy('FW-855: TestBed.get(Compiler) should return TestBed-specific Compiler instance') + .it('should return NgModule id when asked', () => { + @NgModule({ + id: 'test-module', + }) + class TestModule { + } - TestBed.configureTestingModule({ - imports: [TestModule], - }); - const compiler = TestBed.get(Compiler) as Compiler; - expect(compiler.getModuleId(TestModule)).toBe('test-module'); - }); + TestBed.configureTestingModule({ + imports: [TestModule], + }); + const compiler = TestBed.get(Compiler) as Compiler; + expect(compiler.getModuleId(TestModule)).toBe('test-module'); + }); }); describe('errors', () => {