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: #52385
Ref: #49184
PR-URL: #52403
Refs: #49184
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
atlowChemi authored Apr 15, 2024
1 parent f8e325e commit 0db38f0
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 0db38f0

Please sign in to comment.