Skip to content

Commit

Permalink
test_runner: expose lcov reporter as newable function
Browse files Browse the repository at this point in the history
This commit exposes the lcov reporter as a newable function, so that it
can be used in the same way as the other reporters.
This will allow passing in the options to the reporter as well.
This breaks the current behavior of the lcov reporter, which exposes an
instance of the reporter.

Fixes: nodejs#52385
Ref: nodejs#49184
  • Loading branch information
atlowChemi committed Apr 14, 2024
1 parent 756acd0 commit 8c31349
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/test/reporters.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ObjectDefineProperties(module.exports, {
__proto__: null,
configurable: true,
enumerable: true,
get() {
value: function value() {
lcov ??= require('internal/test_runner/reporter/lcov');
return ReflectConstruct(lcov, arguments);
},
Expand Down

0 comments on commit 8c31349

Please sign in to comment.