The lcov reporter outputs test coverage when used with the --experimental-test-coverage flag.
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
specreporter outputs the test results in a human-readable format.
Type definitions
- type 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.TestInterrupted; type: 'test:interrupted' } | { 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' }