Node.js module

node:test/reporters

The 'node:test/reporters' module provides built-in reporter formats for node:test, such as tap, json, and baseline. Reporters format test results for human or machine consumption.

Use reporters to integrate with CI systems, test dashboards, or custom logging pipelines.

Functions 3

  • reporters.dot()

    The dot reporter outputs the test results in a compact format, where each passing test is represented by a ., and each failing test is represented by a X.

  • reporters.junit()

    The junit reporter outputs test results in a jUnit XML format.

  • reporters.tap()

    The tap reporter outputs the test results in the TAP format.

Types 1

Variables 2

  • const reporters.lcov

    The lcov reporter outputs test coverage when used with the --experimental-test-coverage flag.

  • const reporters.spec

    The spec reporter outputs the test results in a human-readable format.