' +
'{{subitem}}-{{item.length}};' +
@@ -250,7 +247,7 @@ export function main() {
inject(
[TestComponentBuilder, AsyncTestCompleter],
(tcb: TestComponentBuilder, async: AsyncTestCompleter) => {
- var template = '
' +
+ const template = '' +
'' +
'{{subitem}}-{{item.length}};' +
'
';
@@ -273,15 +270,15 @@ export function main() {
inject(
[TestComponentBuilder, AsyncTestCompleter],
(tcb: TestComponentBuilder, async: AsyncTestCompleter) => {
- var template =
+ const template =
``;
tcb.overrideTemplate(TestComponent, template)
.createAsync(TestComponent)
.then((fixture) => {
- var el = fixture.debugElement.nativeElement;
- var items = [1];
+ const el = fixture.debugElement.nativeElement;
+ const items = [1];
fixture.debugElement.componentInstance.items = items;
fixture.detectChanges();
expect(el).toHaveText('0|even|');
@@ -302,7 +299,7 @@ export function main() {
inject(
[TestComponentBuilder, AsyncTestCompleter],
(tcb: TestComponentBuilder, async: AsyncTestCompleter) => {
- var template =
+ const template =
'{{i.toString()}}
';
tcb.overrideTemplate(TestComponent, template)
@@ -323,7 +320,7 @@ export function main() {
inject(
[TestComponentBuilder, AsyncTestCompleter],
(tcb: TestComponentBuilder, async: AsyncTestCompleter) => {
- var template =
+ const template =
'{{isFirst.toString()}}
';
tcb.overrideTemplate(TestComponent, template)
@@ -344,7 +341,7 @@ export function main() {
inject(
[TestComponentBuilder, AsyncTestCompleter],
(tcb: TestComponentBuilder, async: AsyncTestCompleter) => {
- var template =
+ const template =
'{{isLast.toString()}}
';
tcb.overrideTemplate(TestComponent, template)
@@ -365,7 +362,7 @@ export function main() {
inject(
[TestComponentBuilder, AsyncTestCompleter],
(tcb: TestComponentBuilder, async: AsyncTestCompleter) => {
- var template =
+ const template =
'{{isEven.toString()}}
';
tcb.overrideTemplate(TestComponent, template)
@@ -386,7 +383,7 @@ export function main() {
inject(
[TestComponentBuilder, AsyncTestCompleter],
(tcb: TestComponentBuilder, async: AsyncTestCompleter) => {
- var template =
+ const template =
'{{isOdd.toString()}}
';
tcb.overrideTemplate(TestComponent, template)
@@ -415,7 +412,7 @@ export function main() {
'{{i}}: {{item}};')
.createAsync(ComponentUsingTestComponent)
.then((fixture) => {
- var testComponent = fixture.debugElement.children[0];
+ const testComponent = fixture.debugElement.children[0];
testComponent.componentInstance.items = ['a', 'b', 'c'];
fixture.detectChanges();
expect(testComponent.nativeElement).toHaveText('0: a;1: b;2: c;');
@@ -433,7 +430,7 @@ export function main() {
.overrideTemplate(ComponentUsingTestComponent, '')
.createAsync(ComponentUsingTestComponent)
.then((fixture) => {
- var testComponent = fixture.debugElement.children[0];
+ const testComponent = fixture.debugElement.children[0];
testComponent.componentInstance.items = ['a', 'b', 'c'];
fixture.detectChanges();
expect(testComponent.nativeElement).toHaveText('0: a;1: b;2: c;');
@@ -453,7 +450,7 @@ export function main() {
'{{i}}: {{item}};')
.createAsync(ComponentUsingTestComponent)
.then((fixture) => {
- var testComponent = fixture.debugElement.children[0];
+ const testComponent = fixture.debugElement.children[0];
testComponent.componentInstance.items = ['a', 'b', 'c'];
fixture.detectChanges();
expect(testComponent.nativeElement).toHaveText('0: a;1: b;2: c;');
@@ -462,7 +459,7 @@ export function main() {
});
}));
- describe('track by', function() {
+ describe('track by', () => {
it('should not replace tracked items',
inject(
[TestComponentBuilder, AsyncTestCompleter],
@@ -491,7 +488,7 @@ export function main() {
inject(
[TestComponentBuilder, AsyncTestCompleter],
(tcb: TestComponentBuilder, async: AsyncTestCompleter) => {
- var template =
+ const template =
`{{item['color']}}
`;
tcb.overrideTemplate(TestComponent, template)
.createAsync(TestComponent)
@@ -509,7 +506,7 @@ export function main() {
inject(
[TestComponentBuilder, AsyncTestCompleter],
(tcb: TestComponentBuilder, async: AsyncTestCompleter) => {
- var template =
+ const template =
`{{item['color']}}
`;
tcb.overrideTemplate(TestComponent, template)
.createAsync(TestComponent)
@@ -530,7 +527,7 @@ export function main() {
inject(
[TestComponentBuilder, AsyncTestCompleter],
(tcb: TestComponentBuilder, async: AsyncTestCompleter) => {
- var template =
+ const template =
`{{item}}
`;
tcb.overrideTemplate(TestComponent, template)
.createAsync(TestComponent)