Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TreeReportBuilder

Tree Report Builder

An extension of {@link ReportBuilder | ReportBuilder} that builds a TreeReport instead of a regular Report.

Hierarchy

Index

Constructors

constructor

Properties

Protected _detailSummaries

_detailSummaries: object

Map of built DetailedSummaries keyed by summary paths

Type declaration

Methods

build

  • Build a TreeReport

    Use the parsed data to build a TreeReport. If at least on section of data has not been parsed yet, this method will throw an error.

    throws

    when builder has not received at least one section of data

    Returns TreeReport

    TreeReport containing parsed data

Private buildDetailTree

  • buildDetailTree(): object
  • Helper method to transform the map of DetailedSummaries to a tree of TreeReportNodes or DetailedSummaries.

    remarks

    This method relies on two other helper methods to 1) group the paths in the tree structure and 2) Apply the DetailedSummaries to the tree structure

    Returns object

    Detail Map to use for TreeReport

Protected getDetailSummaryBuilder

Protected handleParseDetail

  • handleParseDetail(line: string): void
  • Handle parsing data for current section

    remarks

    When the section has enough data, the Summary is built and a new SummaryBuilder is created to handle parsing the next section. If a Summary already exists for the given path, the new Summary is combined with the existing Summary.

    Parameters

    • line: string

      data to parse

    Returns void

Protected handleParseTotal

  • handleParseTotal(line: string): void

parse

  • parse(line: string): void
  • Parse a line of data

    Parse a line of data that matches the LCOV format. Data will contribute to both the section's summary data as well as total summary data for the report.

    Parameters

    • line: string

      data to parse

    Returns void

Generated using TypeDoc