#

API Docs for: 3.10.3
Show: Inherited Protected Private Deprecated

# Test.TestFormat Class

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

An object object containing test result formatting methods.

- Index
- Methods

## Item Index

### Methods

- JSON static
- JUnitXML static
- TAP static
- XML static

## Methods

### `JSON`

(

- `result`

)
String static

Defined in `test/js/TestFormat.js:33`

Returns test results formatted as a JSON string. Requires JSON utility.

#### Parameters:

- `result` Object

  The results object created by TestRunner.

#### Returns:

String: A JSON-formatted string of results.

### `JUnitXML`

(

- `result`

)
String static

Defined in `test/js/TestFormat.js:83`

Returns test results formatted in JUnit XML format.

#### Parameters:

- `result` Object

  The results object created by TestRunner.

#### Returns:

String: An XML-formatted string of results.

### `TAP`

(

- `result`

)
String static

Defined in `test/js/TestFormat.js:159`

Returns test results formatted in TAP format. For more information, see Test Anything Protocol.

#### Parameters:

- `result` Object

  The results object created by TestRunner.

#### Returns:

String: A TAP-formatted string of results.

### `XML`

(

- `result`

)
String static

Defined in `test/js/TestFormat.js:44`

Returns test results formatted as an XML string.

#### Parameters:

- `result` Object

  The results object created by TestRunner.

#### Returns:

String: An XML-formatted string of results.