#

API Docs for: 3.10.3
Show: Inherited Protected Private Deprecated

# Test.Console Class

Defined in: `test-console/js/test-console.js:1`
Module: test-console

Provides a specialized log console widget that's pre-configured to display YUI Test output with no extra configuration.

- Index
- Methods

## Item Index

### Methods

- _addDerivedInfoForFile
- _blankSummary
- _computeBranchTotals
- _computSimpleTotals
- _isIstanbul
- _parseCoverage
- _percent
- parseInstanbul
- parseYUITest

## Methods

### `_addDerivedInfoForFile`

(

- `fileCoverage`

)
private

Defined in `test-console/js/test-console.js:145`

Calculates line numbers from statement coverage

#### Parameters:

- `fileCoverage` Object

  JSON coverage data

### `_blankSummary`

() Object

Defined in `test-console/js/test-console.js:116`

Generates a generic summary object used for Istanbul conversions.

#### Returns:

Object: Generic summary object

### `_computeBranchTotals`

(

- `fileCoverage`

)
private

Defined in `test-console/js/test-console.js:203`

Noramlizes branch data from Istanbul

#### Parameters:

- `fileCoverage` Object

  JSON coverage data

### `_computSimpleTotals`

(

- `fileCoverage`
- `property`

)
private

Defined in `test-console/js/test-console.js:183`

Summarize simple properties in the coverage data

#### Parameters:

- `fileCoverage` Object

  JSON coverage data

- `property` String

  The property to summarize

### `_isIstanbul`

(

- `json`

)
Boolean

Defined in `test-console/js/test-console.js:58`

Scans the coverage data to determine if it's an Istanbul coverage object.

#### Parameters:

- `json` Object

  The coverage data to scan

#### Returns:

Boolean: True if this is Istanbul Coverage

### `_parseCoverage`

() private

Defined in `test-console/js/test-console.js:247`

Parses YUITest or Istanbul coverage results if they are available and logs them.

### `_percent`

(

- `covered`
- `total`

)
private

Defined in `test-console/js/test-console.js:168`

Generic percent calculator

#### Parameters:

- `covered` Number

  The covered amount

- `total` Number

  The total

### `parseInstanbul`

(

- `coverage`

)

Defined in `test-console/js/test-console.js:221`

Takes an Istanbul coverage object, normalizes it and prints a log with a summary

#### Parameters:

- `coverage` Object

  The coverage object to normalize and log

### `parseYUITest`

(

- `coverage`

)

Defined in `test-console/js/test-console.js:77`

Parses and logs a summary of YUITest coverage data.

#### Parameters:

- `coverage` Object

  The YUITest Coverage JSON data