Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Node.js node:test/reporters module | API Reference | Bun
[go: Go Back, main page]

Bun

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.

  • const lcov: ReporterConstructorWrapper<typeof LcovReporter>
  • const spec: ReporterConstructorWrapper<typeof SpecReporter>

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

  • function dot(
    source: AsyncIterable<TestEvent>
    ): AsyncIterator<string>;

    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.

  • function junit(
    source: AsyncIterable<TestEvent>
    ): AsyncIterator<string>;

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

  • function tap(
    source: AsyncIterable<TestEvent>
    ): AsyncIterator<string>;

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

Type definitions