build: remove main() from specs (#21053)

PR Close #21053
This commit is contained in:
Misko Hevery
2017-12-16 14:42:55 -08:00
committed by Igor Minar
parent 47bcb5bc35
commit 47e251a80a
191 changed files with 424 additions and 424 deletions

View File

@ -8,7 +8,7 @@
import {computeMsgId, digest, sha1} from '../../src/i18n/digest';
export function main(): void {
{
describe('digest', () => {
describe('digest', () => {
it('must return the ID if it\'s explicit', () => {

View File

@ -16,7 +16,7 @@ import {TranslationBundle} from '../../src/i18n/translation_bundle';
import * as html from '../../src/ml_parser/ast';
import {serializeNodes as serializeHtmlNodes} from '../ml_parser/ast_serializer_spec';
export function main() {
{
describe('Extractor', () => {
describe('elements', () => {
it('should extract from elements', () => {

View File

@ -11,7 +11,7 @@ import {TranslationBundle} from '@angular/compiler/src/i18n/translation_bundle';
import {HtmlParser} from '@angular/compiler/src/ml_parser/html_parser';
import {ParseTreeResult} from '@angular/compiler/src/ml_parser/parser';
export function main() {
{
describe('I18N html parser', () => {
// https://github.com/angular/angular/issues/14322
it('should parse the translations only once', () => {

View File

@ -12,7 +12,7 @@ import {Message} from '@angular/compiler/src/i18n/i18n_ast';
import {HtmlParser} from '@angular/compiler/src/ml_parser/html_parser';
import {DEFAULT_INTERPOLATION_CONFIG} from '@angular/compiler/src/ml_parser/interpolation_config';
export function main() {
{
describe('I18nParser', () => {
describe('elements', () => {

View File

@ -20,7 +20,7 @@ import {SpyResourceLoader} from '../spies';
import {FrLocalization, HTML, I18nComponent, validateHtml} from './integration_common';
export function main() {
{
describe('i18n XLIFF 2.0 integration spec', () => {
beforeEach(async(() => {

View File

@ -20,7 +20,7 @@ import {SpyResourceLoader} from '../spies';
import {FrLocalization, HTML, I18nComponent, validateHtml} from './integration_common';
export function main() {
{
describe('i18n XLIFF integration spec', () => {
beforeEach(async(() => {

View File

@ -20,7 +20,7 @@ import {SpyResourceLoader} from '../spies';
import {FrLocalization, HTML, I18nComponent, validateHtml} from './integration_common';
export function main() {
{
describe('i18n XMB/XTB integration spec', () => {
beforeEach(async(() => {

View File

@ -13,7 +13,7 @@ import {Serializer} from '../../src/i18n/serializers/serializer';
import {HtmlParser} from '../../src/ml_parser/html_parser';
import {DEFAULT_INTERPOLATION_CONFIG} from '../../src/ml_parser/interpolation_config';
export function main(): void {
{
describe('MessageBundle', () => {
describe('Messages', () => {
let messages: MessageBundle;

View File

@ -11,7 +11,7 @@ import * as i18n from '@angular/compiler/src/i18n/i18n_ast';
import {serializeNodes} from '../../../src/i18n/digest';
import {_extractMessages} from '../i18n_parser_spec';
export function main(): void {
{
describe('i18n AST', () => {
describe('CloneVisitor', () => {
it('should clone an AST', () => {

View File

@ -8,7 +8,7 @@
import {PlaceholderRegistry} from '../../../src/i18n/serializers/placeholder';
export function main(): void {
{
describe('PlaceholderRegistry', () => {
let reg: PlaceholderRegistry;

View File

@ -242,7 +242,7 @@ lignes</target>
</xliff>
`;
export function main(): void {
(function(){
const serializer = new Xliff2();
function toXliff(html: string, locale: string | null = null): string {
@ -413,4 +413,4 @@ lignes`
});
});
});
}
})();

View File

@ -226,7 +226,7 @@ lignes</target>
</xliff>
`;
export function main(): void {
(function(){
const serializer = new Xliff();
function toXliff(html: string, locale: string | null = null): string {
@ -381,4 +381,4 @@ lignes`
});
});
});
}
})();

View File

@ -11,7 +11,7 @@ import {Xmb} from '@angular/compiler/src/i18n/serializers/xmb';
import {HtmlParser} from '@angular/compiler/src/ml_parser/html_parser';
import {DEFAULT_INTERPOLATION_CONFIG} from '@angular/compiler/src/ml_parser/interpolation_config';
export function main(): void {
{
describe('XMB serializer', () => {
const HTML = `
<p>not translatable</p>

View File

@ -8,7 +8,7 @@
import * as xml from '../../../src/i18n/serializers/xml_helper';
export function main(): void {
{
describe('XML helper', () => {
it('should serialize XML declaration', () => {
expect(xml.serialize([new xml.Declaration({version: '1.0'})]))

View File

@ -12,7 +12,7 @@ import * as i18n from '../../../src/i18n/i18n_ast';
import {Xtb} from '../../../src/i18n/serializers/xtb';
export function main(): void {
{
describe('XTB serializer', () => {
const serializer = new Xtb();

View File

@ -14,7 +14,7 @@ import {ParseLocation, ParseSourceFile, ParseSourceSpan} from '../../src/parse_u
import {serializeNodes} from '../ml_parser/ast_serializer_spec';
import {_extractMessages} from './i18n_parser_spec';
export function main(): void {
{
describe('TranslationBundle', () => {
const file = new ParseSourceFile('content', 'url');
const startLocation = new ParseLocation(file, 0, 0, 0);