Home Manual Reference Source Test
public class | source

CliReporter

Extends:

Reporter → CliReporter

A reporter that prints an ASCII table with all files and their coverage values.

Test:

Constructor Summary

Public Constructor
public

Creates a new CliReporter.

Member Summary

Public Members
public

The table to print.

Method Summary

Public Methods
public

addRow(name: string, success: boolean, actual: number, expected: number, uncoveredLines: number[])

Adds a row to the table

public

Adds a summary row to the table and prints it.

public

report(filename: string, success: boolean, actual: number, expected: number, uncoveredLines: number[])

Reports the coverage of a file.

Inherited Summary

From class Reporter
public

Number of covered identifiers.

public

Total number of identifiers.

public

The number of files processed but nut covered.

public

The number of files processed.

public

If the report has a failure.

public

Called once all files have been processed.

public

report(filename: string, success: boolean, actual: number, expected: number, uncoveredLines: number[])

Reports the coverage of a file.

Public Constructors

public constructor() source

Creates a new CliReporter.

Override:

Reporter#constructor

Test:

Public Members

public table: cli-table~Table source

The table to print.

Public Methods

public addRow(name: string, success: boolean, actual: number, expected: number, uncoveredLines: number[]) source

Adds a row to the table

Params:

NameTypeAttributeDescription
name string

Name of the row.

success boolean

If the file's documentation coverage meets the threshold.

actual number

Number of documented identifiers.

expected number

Number of expected identifiers.

uncoveredLines number[]

Array of line numbers not documented.

Test:

public finish(): Promise<Error, String> source

Adds a summary row to the table and prints it. Also sets the process exit code to 1 if the threshold was not met.

Override:

Reporter#finish

Return:

Promise<Error, String>

Resolved with the report or an error.

Test:

public report(filename: string, success: boolean, actual: number, expected: number, uncoveredLines: number[]) source

Reports the coverage of a file.

Override:

Reporter#report

Params:

NameTypeAttributeDescription
filename string

Name of the file.

success boolean

If the file's documentation coverage meets the threshold.

actual number

Number of documented identifiers.

expected number

Number of expected identifiers.

uncoveredLines number[]

Array of line numbers not documented.

Test: