From dcf3e749de66fa01636339604c0a1b472ac434c9 Mon Sep 17 00:00:00 2001 From: Mihir Bhansali Date: Mon, 6 May 2024 15:24:55 -0400 Subject: [PATCH] test_runner: reporterColorMap changed to map functions --- lib/internal/test_runner/reporter/utils.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/internal/test_runner/reporter/utils.js b/lib/internal/test_runner/reporter/utils.js index caa35959ee751a..42c4ffa3cdaaec 100644 --- a/lib/internal/test_runner/reporter/utils.js +++ b/lib/internal/test_runner/reporter/utils.js @@ -28,9 +28,15 @@ const reporterUnicodeSymbolMap = { const reporterColorMap = { '__proto__': null, - 'test:fail': colors.red, - 'test:pass': colors.green, - 'test:diagnostic': colors.blue, + get 'test:fail'() { + return colors.red; + }, + get 'test:pass'() { + return colors.green; + }, + get 'test:diagnostic'() { + return colors.blue; + }, }; function indent(nesting) {