How to use the @build-tracker/comparator.CellType.DELTA function in @build-tracker/comparator

To help you get started, we’ve selected a few @build-tracker/comparator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github paularmstrong / build-tracker / packages / app / src / components / ComparisonTable / ComparisonTable.js View on Github external
key={cellIndex}
            linked
            onToggle={this._handleToggleAllArtifacts}
            style={cellStyles && [...cellStyles, styles.stickyColumnStickyHeader]}
          />
        );
      case CellType.TEXT:
        return (
          
        );
      case CellType.TOTAL_DELTA:
      case CellType.DELTA: {
        // $FlowFixMe
        const deltaCell = (cell: BT$DeltaCellType);
        return (
          
        );
      }
      case CellType.TOTAL: {
github paularmstrong / build-tracker / packages / app / src / components / ComparisonTable / ArtifactRow.js View on Github external
switch (cell && cell.type) {
      case CellType.ARTIFACT:
        return (
          
        );
      case CellType.DELTA: {
        // $FlowFixMe
        const deltaCell = (cell: BT$DeltaCellType);
        return (
          
        );
      }
      case CellType.TOTAL: {
        // $FlowFixMe
github paularmstrong / build-tracker / src / app / src / components / ComparisonTable / __tests__ / DeltaCell.text.tsx View on Github external
test('shows formatted bytes and delta in the title', () => {
      const wrapper = shallow(
        
      );

      expect(wrapper.find(Td).prop('title')).toEqual('-134 bytes (-50.0%)');
    });
github paularmstrong / build-tracker / src / app / src / components / ComparisonTable / __tests__ / DeltaCell.text.tsx View on Github external
test('is a formatted value', () => {
      const wrapper = shallow(
        
      );
      expect(
        wrapper
          .find(Text)
          .children()
          .text()
      ).toEqual('4.2 KiB');
    });
github paularmstrong / build-tracker / src / app / src / components / ComparisonTable / BodyRow.tsx View on Github external
const mapBodyCell = (cell: ACell | TCell | TDCell | DCell, i: number): React.ReactElement | void => {
    switch (cell.type) {
      case CellType.ARTIFACT: {
        return (
          
        );
      }
      case CellType.DELTA:
        return ;
      case CellType.TOTAL:
        return ;
    }
  };