From 8c31349199838b3ee095acd99a3ffd5feb04b796 Mon Sep 17 00:00:00 2001 From: atlowChemi Date: Sun, 7 Apr 2024 13:22:28 +0300 Subject: [PATCH] test_runner: expose lcov reporter as newable function 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: https://github.com/nodejs/node/issues/52385 Ref: https://github.com/nodejs/node/pull/49184 --- lib/test/reporters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/test/reporters.js b/lib/test/reporters.js index 6316074e6e64aa..401f476d29083b 100644 --- a/lib/test/reporters.js +++ b/lib/test/reporters.js @@ -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); },