温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/node/test/reporters
点击访问原文链接

Node.js node:test/reporters module | API Reference | Bun

Node.js node:test/reporters module | API Reference | BunBuildDocsReferenceGuidesBlogDiscord/node:test/reportersFdotFjunitVlcovVspecFtap

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:test/reportersFdotFjunitVlcovVspecFtap

Node.js module

node:test/reportersThe '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: ReporterConstructorWrappertypeof LcovReporter>The lcov reporter outputs test coverage when used with the --experimental-test-coverage flag.

const spec: ReporterConstructorWrappertypeof SpecReporter>The spec reporter outputs the test results in a human-readable format.

function dot(source: AsyncIterableTestEvent>): AsyncIteratorstring>;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: AsyncIterableTestEvent>): AsyncIteratorstring>;The junit reporter outputs test results in a jUnit XML format.

function tap(source: AsyncIterableTestEvent>): AsyncIteratorstring>;The tap reporter outputs the test results in the TAP format.

Type definitionstype TestEvent = { data: EventData.TestCoverage; type: 'test:coverage' } | { data: EventData.TestComplete; type: 'test:complete' } | { data: EventData.TestDequeue; type: 'test:dequeue' } | { data: EventData.TestDiagnostic; type: 'test:diagnostic' } | { data: EventData.TestEnqueue; type: 'test:enqueue' } | { data: EventData.TestFail; type: 'test:fail' } | { data: EventData.TestPass; type: 'test:pass' } | { data: EventData.TestPlan; type: 'test:plan' } | { data: EventData.TestStart; type: 'test:start' } | { data: EventData.TestStderr; type: 'test:stderr' } | { data: EventData.TestStdout; type: 'test:stdout' } | { data: EventData.TestSummary; type: 'test:summary' } | { data: undefined; type: 'test:watch:drained' } | { data: undefined; type: 'test:watch:restarted' }

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco

We're hiring →

智能索引记录