title: Code coverage for arrow functions inside an object in Karma
body: <p>I am writing a unit test for one of my applications in which the specifications are passed. But after seeing the code coverage, some parts do not seem to be covered as shown below:</p>
  <pre><code>this.columnDefs = [
        {
          translateKey: 'DEVICES.LIST.SNO',
          width: 100,
          resizable: false,
          sortable: false,
          suppressSizeToFit: true,
          floatingFilter: false,
          valueGetter: (args) =&gt; this.getId(args),
          checkboxSelection: (params) =&gt; {
            return params.columnApi.getRowGroupColumns().length === 0;
          },
          headerCheckboxSelection: (params) =&gt; {
            return params.columnApi.getRowGroupColumns().length === 0;
          },
        },
        ...gridColumns,
      ];
  </code></pre>
  <p>In which the valueGetter, CheckboxSelection are not covered
  <a href="https://i.stack.imgur.com/ydMKe.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ydMKe.jpg" alt="enter image description here" /></a></p>
  <p>Component File:</p>
  <pre><code>export class ListComponent implements OnInit, OnDestroy {
    columnDefs: DeviceColumns[];
    defaultColumnDefs: any;
    gridApi: any;
    columnApi: any;
  
    constructor() {}
  
    ngOnInit() {
      this.initializeColumns();
    }
  
    initializeColumns() {
      this.columnDefs = [
        {
          translateKey: 'DEVICES.LIST.SNO',
          width: 100,
          resizable: false,
          sortable: false,
          suppressSizeToFit: true,
          floatingFilter: false,
          valueGetter: (args) =&gt; this.getId(args),
          checkboxSelection: (params) =&gt; {
            return params.columnApi.getRowGroupColumns().length === 0;
          },
          headerCheckboxSelection: (params) =&gt; {
            return params.columnApi.getRowGroupColumns().length === 0;
          },
        },
      ];
      this.columnDefs.forEach((columnDef) =&gt; {
        columnDef.floatingFilter = this.hasFloatingFilter;
      });
      this.columnDefs = map(this.columnDefs, (columnDef) =&gt; {
        return extend({}, columnDef, { headerValueGetter: this.localizeHeader.bind(this) });
      });
    }
  
    getId(args: any): any {
      return (
        this.pagination.per_page * this.pagination.prev_page + parseInt(args.node.rowIndex, 10) + 1
      );
    }
  
    OnGridReady(params) {
      this.gridApi = params.api;
      this.columnApi = params.columnApi;
    }
  
    ngOnDestroy() {
      this.subscriptions.unsubscribe();
    }
  }
  
  </code></pre>
  <p>I need help for performing code coverage for these arrow functions.</p>