Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DetailedRecord

Detailed Coverage Record Data

A stuctured object to hold coverage counts for any piece of data (e.g. Branches, Functions, Lines) that also supports detailed data on the coverage counts (see @{link Detail | Detail} for more info).

This class also supports combining and cloning data.

Hierarchy

Implements

Index

Constructors

constructor

  • new DetailedRecord(total: number, hit: number, miss?: undefined | number, initialDetails?: undefined | object): DetailedRecord
  • Construct a DetailedRecord with the given data

    Parameters

    • total: number

      the total count

    • hit: number

      the hit count

    • Optional miss: undefined | number

      the miss count (optional: will be calculated from total and hit if not provided)

    • Optional initialDetails: undefined | object

      the initial detail map to be associated with the DetailedRecord

    Returns DetailedRecord

Accessors

details

  • get details(): object

hit

  • get hit(): number

miss

  • get miss(): number

total

  • get total(): number

Methods

addDetail

  • addDetail(detail: Detail): void
  • Add a Detail

    Clones the incoming detail and adds it to the stored details. If a detail already exists for the line number, the incoming detail will be combined with the existing detail.

    Parameters

    • detail: Detail

      the detail to add

    Returns void

clone

combine

Protected combineDetails

  • combineDetails(otherDetails: object): object
  • Combine details

    Combine the current detail map with an incoming detail map. If details exist in both maps, they will be combined, otherwise the data will be cloned.

    This is a helper method to the combine methods.

    Parameters

    • otherDetails: object

    Returns object

Generated using TypeDoc