src/connectors/appscript-connector.js
/**
   * appendList - The helper function to append arbitrary items, like Tests,
   * Results, or Config items.
   * @param  {string} tabId The keys of tabConfigs. E.g. "testsTab"
   * @param  {Array<object>} items Array of new items.
   * @param  {Function} rowIndexFunc The function that returns rowIndex for each item.
   */
The helper function to append arbitrary items, like Tests,
Results, or Config items.
@param  {string} tabId The keys of tabConfigs.
The helper function to append arbitrary items like Tests Results or Config items . @param { string } tabId The keys of tabConfigs .
appendList(tabId, items, rowIndexFunc) {
    if (!items || items.length === 0) return;
    let tabConfig = this.tabConfigs[tabId];
    let propertyLookup = this.getPropertyLookup(tabId);
    let firstRowIndex, allValues = [];
    let rowIndex = tabConfig.skipRows + 1;
    items.forEach(item => {
      let values = [];
      propertyLookup.forEach(lookup => {
        if (typeof lookup !== 'string') {
          throw new Error(
              `${tabId} Tab: Property lookup ${lookup} is not a string`);
        }
        try {
          let value = lookup ? eval(`item.${lookup}`) : '';
          values.push(value);
        } catch (error) {
          values.push('');
        }
      });
      if (!firstRowIndex) {
        firstRowIndex = rowIndexFunc ? rowIndexFunc(item, rowIndex) : rowIndex;
      }
      allValues.push(values);
      rowIndex++;
    });
    let range = this.getRowRange(tabId, firstRowIndex, items.length);
    range.setValues(allValues);
  }
appendList ( tabId , items , rowIndexFunc ) { if ( ! items || items . length === 0 ) return ; let tabConfig = this . tabConfigs [ tabId ] ; let propertyLookup = this . getPropertyLookup ( tabId ) ; let firstRowIndex , allValues = [ ] ; let rowIndex = tabConfig . skipRows + 1 ; items . forEach ( item => { let values = [ ] ; propertyLookup . forEach ( lookup => { if ( typeof lookup !== 'string' ) { throw new Error ( ` ${ tabId } ${ lookup } ` ) ; } try { let value = lookup ? eval ( ` ${ lookup } ` ) : '' ; values . push ( value ) ; } catch ( error ) { values . push ( '' ) ; } } ) ; if ( ! firstRowIndex ) { firstRowIndex = rowIndexFunc ? rowIndexFunc ( item , rowIndex ) : rowIndex ; } allValues . push ( values ) ; rowIndex ++ ; } ) ; let range = this . getRowRange ( tabId , firstRowIndex , items . length ) ; range . setValues ( allValues ) ; }
appendList - The helper function to append arbitrary items, like Tests,
 Results, or Config items.
appendList - The helper function to append arbitrary items like Tests Results or Config items .
// Update in batch.