fix(compiler): remove i18n markup even if no translations (#17999)
Fixes #11042
This commit is contained in:

committed by
Jason Aden

parent
2ba3ada27f
commit
9c3386b1b7
33
packages/compiler-cli/integrationtest/test/util_alt.ts
Normal file
33
packages/compiler-cli/integrationtest/test/util_alt.ts
Normal file
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {NgModuleRef} from '@angular/core';
|
||||
import {ComponentFixture} from '@angular/core/testing';
|
||||
import {platformServerTesting} from '@angular/platform-server/testing';
|
||||
|
||||
import {MainModuleNgFactory} from '../alt/src/module.ngfactory';
|
||||
import {MainModule} from '../src/module';
|
||||
|
||||
let mainModuleRef: NgModuleRef<MainModule> = null !;
|
||||
beforeEach((done) => {
|
||||
platformServerTesting().bootstrapModuleFactory(MainModuleNgFactory).then((moduleRef: any) => {
|
||||
mainModuleRef = moduleRef;
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
export function createModule(): NgModuleRef<MainModule> {
|
||||
return mainModuleRef;
|
||||
}
|
||||
|
||||
export function createComponentAlt<C>(comp: {new (...args: any[]): C}): ComponentFixture<C> {
|
||||
const moduleRef = createModule();
|
||||
const compRef =
|
||||
moduleRef.componentFactoryResolver.resolveComponentFactory(comp).create(moduleRef.injector);
|
||||
return new ComponentFixture(compRef, null, false);
|
||||
}
|
Reference in New Issue
Block a user