Skip to content

Commit

Permalink
chore: Change the text color for better readability
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
mitsuki31 committed Apr 20, 2024
1 parent 87d9c54 commit 27c2c2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/lib/simpletest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 27c2c2c

Please sign in to comment.