#

API Docs for: 3.10.3
Show: Inherited Protected Private Deprecated

# Test.CoverageFormat Class

Defined in: `test/js/CoverageFormat.js:1`
Module: test

An object object containing coverage result formatting methods.

- Index
- Methods

## Item Index

### Methods

- JSON
- XdebugJSON

## Methods

### `JSON`

(

- `coverage`

)
String

Defined in `test/js/CoverageFormat.js:10`

Returns the coverage report in JSON format. This is the straight JSON representation of the native coverage report.

#### Parameters:

- `coverage` Object

  The coverage report object.

#### Returns:

String: A JSON-formatted string of coverage data.

### `XdebugJSON`

(

- `coverage`

)
String

Defined in `test/js/CoverageFormat.js:22`

Returns the coverage report in a JSON format compatible with Xdebug. See Xdebug Documentation for more information. Note: function coverage is not available in this format.

#### Parameters:

- `coverage` Object

  The coverage report object.

#### Returns:

String: A JSON-formatted string of coverage data.