From 27c2c2c7dbda096a717d32da8180ea647fddaadc Mon Sep 17 00:00:00 2001 From: Ryuu Mitsuki Date: Sat, 20 Apr 2024 23:01:37 +0700 Subject: [PATCH] chore: Change the text color for better readability A small change to `simpletest` library, changed the text description color for success test cases to a bit darker, but keep the description color for failed test cases to default white. This allows developers and users to focus on where the failed tests have occurred (if any). --- test/lib/simpletest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/lib/simpletest.js b/test/lib/simpletest.js index 035744c..c60f239 100644 --- a/test/lib/simpletest.js +++ b/test/lib/simpletest.js @@ -44,9 +44,9 @@ async function it(desc, func, continueOnErr=false) { const { isAsyncFunction } = require('node:util').types; try { isAsyncFunction(func) ? await func() : func(); - console.log(` \x1b[92m\u2714 \x1b[0m\x1b[1m${desc}\x1b[0m`); + console.log(` \x1b[92m\u2714 \x1b[0m\x1b[2m${desc}\x1b[0m`); } catch (err) { - console.error(` \x1b[91m\u2718 \x1b[0m\x1b[1m${desc}\x1b[0m\n`); + console.error(` \x1b[91m\u2718 \x1b[0m${desc}\n`); console.error(new TestError(err.message)); !!continueOnErr || process.exit(1); // Force terminate the process }