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

@ -40,7 +40,7 @@ function asyncValidator(expected: any, timeout = 0) {
};
}
export function main() {
{
describe('Form Directives', () => {
let defaultAccessor: DefaultValueAccessor;

View File

@ -12,7 +12,7 @@ import {AbstractControl, FormArray, FormControl, FormGroup, ValidationErrors} fr
import {of } from 'rxjs/observable/of';
import {Validators} from '../src/validators';
export function main() {
(function(){
function asyncValidator(expected: string, timeouts = {}) {
return (c: AbstractControl) => {
let resolve: (result: any) => void = undefined !;
@ -1100,4 +1100,4 @@ export function main() {
});
});
}
})();

View File

@ -9,7 +9,7 @@
import {beforeEach, describe, expect, it} from '@angular/core/testing/src/testing_internal';
import {FormBuilder} from '@angular/forms';
export function main() {
(function(){
function syncValidator(_: any /** TODO #9100 */): any /** TODO #9100 */ { return null; }
function asyncValidator(_: any /** TODO #9100 */) { return Promise.resolve(null); }
@ -67,4 +67,4 @@ export function main() {
expect(a.asyncValidator).toBe(asyncValidator);
});
});
}
})();

View File

@ -13,7 +13,7 @@ import {FormControl, FormGroup, Validators} from '@angular/forms';
import {FormArray} from '../src/model';
export function main() {
(function(){
function asyncValidator(expected: string, timeouts = {}) {
return (c: FormControl) => {
let resolve: (result: any) => void = undefined !;
@ -1142,4 +1142,4 @@ export function main() {
});
});
});
}
})();

View File

@ -13,7 +13,7 @@ import {AbstractControl, FormArray, FormControl, FormGroup, ValidationErrors, Va
import {of } from 'rxjs/observable/of';
export function main() {
(function(){
function simpleValidator(c: AbstractControl): ValidationErrors|null {
return c.get('one') !.value === 'correct' ? null : {'broken': true};
}
@ -1126,4 +1126,4 @@ export function main() {
});
}
})();

View File

@ -18,7 +18,7 @@ import {_do} from 'rxjs/operator/do';
import {MyInput, MyInputForm} from './value_accessor_integration_spec';
export function main() {
{
describe('reactive forms integration tests', () => {
function initTest<T>(component: Type<T>, ...directives: Type<any>[]): ComponentFixture<T> {

View File

@ -16,7 +16,7 @@ import {merge} from 'rxjs/observable/merge';
import {NgModelCustomComp, NgModelCustomWrapper} from './value_accessor_integration_spec';
export function main() {
{
describe('template-driven forms integration tests', () => {
function initTest<T>(component: Type<T>, ...directives: Type<any>[]): ComponentFixture<T> {

View File

@ -17,7 +17,7 @@ import {map} from 'rxjs/operator/map';
import {normalizeAsyncValidator} from '../src/directives/normalize_validator';
import {AsyncValidator, ValidationErrors, ValidatorFn} from '../src/directives/validators';
export function main() {
(function(){
function validator(key: string, error: any): ValidatorFn {
return (c: AbstractControl) => {
const r: ValidationErrors = {};
@ -435,4 +435,4 @@ export function main() {
});
});
}
})();

View File

@ -12,7 +12,7 @@ import {AbstractControl, ControlValueAccessor, FormControl, FormGroup, FormsModu
import {By} from '@angular/platform-browser/src/dom/debug/by';
import {dispatchEvent} from '@angular/platform-browser/testing/src/browser_util';
export function main() {
{
describe('value accessors', () => {
function initTest<T>(component: Type<T>, ...directives: Type<any>[]): ComponentFixture<T> {