refactor: simplify arrow functions (#12057)
This commit is contained in:

committed by
Chuck Jazdzewski

parent
6f7ed32154
commit
0528dcb9dc
@ -758,8 +758,7 @@ function declareTests({useJit}: {useJit: boolean}) {
|
||||
describe('*ngFor', () => {
|
||||
let tpl = '<div *ngFor="let item of items" @trigger>{{ item }}</div>';
|
||||
|
||||
let getText =
|
||||
(node: any) => { return node.innerHTML ? node.innerHTML : node.children[0].data; };
|
||||
let getText = (node: any) => node.innerHTML ? node.innerHTML : node.children[0].data;
|
||||
|
||||
let assertParentChildContents = (parent: any, content: string) => {
|
||||
var values: string[] = [];
|
||||
|
@ -486,8 +486,7 @@ export function main() {
|
||||
|
||||
var trackByItemId = (index: number, item: any): any => item.id;
|
||||
|
||||
var buildItemList =
|
||||
(list: string[]) => { return list.map((val) => { return new ItemWithId(val); }); };
|
||||
var buildItemList = (list: string[]) => list.map((val) => new ItemWithId(val));
|
||||
|
||||
beforeEach(() => { differ = new DefaultIterableDiffer(trackByItemId); });
|
||||
|
||||
|
@ -214,7 +214,7 @@ function commonTests() {
|
||||
describe('run', () => {
|
||||
it('should return the body return value from run',
|
||||
inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
macroTask(() => { expect(_zone.run(() => { return 6; })).toEqual(6); });
|
||||
macroTask(() => { expect(_zone.run(() => 6)).toEqual(6); });
|
||||
|
||||
macroTask(() => { async.done(); });
|
||||
}), testTimeout);
|
||||
|
Reference in New Issue
Block a user