Skip to content

Commit

Permalink
chore: add linebreaks for more readability
Browse files Browse the repository at this point in the history
  • Loading branch information
delanni committed Jan 31, 2024
1 parent 7c3ff97 commit ec2da39
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@

const FAILURE_MESSAGE_TRIGGERS = ['but is not defined anymore'];
const log = (...args) => {
const loggable = args.map((arg) => (typeof arg === 'string' ? arg : JSON.stringify(arg)));
process.stdout.write(`${loggable.join(' ')}\n`);
const loggable = args.map((arg) =>
typeof arg === 'string' ? arg : JSON.stringify(arg, null, 2)
);
process.stdout.write(`${loggable.join(' ')}\n`, 'utf8');
};
/**
* This processor looks for specific errors, and logs the result context of test suites where they occur.
Expand All @@ -26,7 +28,7 @@ module.exports = (results) => {
if (resultsThatMatchTriggers.length !== 0) {
log('The following test suites failed, with notable errors:');
resultsThatMatchTriggers.forEach((e) => {
log(` -> ${e.testFilePath}`, 'Details: ', e);
log(` -> ${e.testFilePath}`, 'Details: ', e, '\n');
});
}

Expand Down

0 comments on commit ec2da39

Please sign in to comment.