refactor: simplify arrow functions (#12057)

This commit is contained in:
Victor Berchet
2016-10-04 15:57:37 -07:00
committed by Chuck Jazdzewski
parent a63359689f
commit 50c37d45dc
25 changed files with 43 additions and 51 deletions

View File

@ -814,7 +814,7 @@ export function main() {
describe('disabled errors', () => {
it('should clear out array errors when disabled', () => {
const arr = new FormArray([new FormControl()], () => { return {'expected': true}; });
const arr = new FormArray([new FormControl()], () => ({'expected': true}));
expect(arr.errors).toEqual({'expected': true});
arr.disable();
@ -825,7 +825,7 @@ export function main() {
});
it('should re-populate array errors when enabled from a child', () => {
const arr = new FormArray([new FormControl()], () => { return {'expected': true}; });
const arr = new FormArray([new FormControl()], () => ({'expected': true}));
arr.disable();
expect(arr.errors).toEqual(null);

View File

@ -823,7 +823,7 @@ export function main() {
describe('disabled errors', () => {
it('should clear out group errors when disabled', () => {
const g = new FormGroup({'one': new FormControl()}, () => { return {'expected': true}; });
const g = new FormGroup({'one': new FormControl()}, () => ({'expected': true}));
expect(g.errors).toEqual({'expected': true});
g.disable();
@ -834,7 +834,7 @@ export function main() {
});
it('should re-populate group errors when enabled from a child', () => {
const g = new FormGroup({'one': new FormControl()}, () => { return {'expected': true}; });
const g = new FormGroup({'one': new FormControl()}, () => ({'expected': true}));
g.disable();
expect(g.errors).toEqual(null);