0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-25 16:34:05 +01:00
nodejs/lib/test/reporters.js
Phil Nash c60c11aae1
test_runner: adds built in lcov reporter
Fixes https://github.com/nodejs/node/issues/49626

PR-URL: https://github.com/nodejs/node/pull/50018
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2023-10-25 12:11:32 +00:00

59 lines
1.2 KiB
JavaScript

'use strict';
const { ObjectDefineProperties, ReflectConstruct } = primordials;
let dot;
let junit;
let spec;
let tap;
let lcov;
ObjectDefineProperties(module.exports, {
__proto__: null,
dot: {
__proto__: null,
configurable: true,
enumerable: true,
get() {
dot ??= require('internal/test_runner/reporter/dot');
return dot;
},
},
junit: {
__proto__: null,
configurable: true,
enumerable: true,
get() {
junit ??= require('internal/test_runner/reporter/junit');
return junit;
},
},
spec: {
__proto__: null,
configurable: true,
enumerable: true,
value: function value() {
spec ??= require('internal/test_runner/reporter/spec');
return ReflectConstruct(spec, arguments);
},
},
tap: {
__proto__: null,
configurable: true,
enumerable: true,
get() {
tap ??= require('internal/test_runner/reporter/tap');
return tap;
},
},
lcov: {
__proto__: null,
configurable: true,
enumerable: true,
get() {
lcov ??= require('internal/test_runner/reporter/lcov');
return ReflectConstruct(lcov, arguments);
},
},
});