Skip to content

Commit

Permalink
chore(testrunner): nicer colors for test reporter (#3921)
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov committed Feb 6, 2019
1 parent 1676f99 commit bc71e92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/testrunner/Reporter.js
Expand Up @@ -116,7 +116,7 @@ class Reporter {
console.log('\nSkipped:');
for (let i = 0; i < skippedTests.length; ++i) {
const test = skippedTests[i];
console.log(`${i + 1}) ${test.fullName} (${YELLOW_COLOR}${formatTestLocation(test)}${RESET_COLOR})`);
console.log(`${i + 1}) ${test.fullName} (${formatTestLocation(test)})`);
console.log(` ${YELLOW_COLOR}Temporary disabled with xit${RESET_COLOR}`);
}
}
Expand All @@ -131,7 +131,7 @@ class Reporter {
for (let i = 0; i < slowTests.length; ++i) {
const test = slowTests[i];
const duration = test.endTimestamp - test.startTimestamp;
console.log(` (${i + 1}) ${YELLOW_COLOR}${duration / 1000}s${RESET_COLOR} - ${test.fullName} (${YELLOW_COLOR}${formatTestLocation(test)}${RESET_COLOR})`);
console.log(` (${i + 1}) ${YELLOW_COLOR}${duration / 1000}s${RESET_COLOR} - ${test.fullName} (${formatTestLocation(test)})`);
}
}

Expand Down Expand Up @@ -183,7 +183,7 @@ function formatTestLocation(test) {
const location = test.location;
if (!location)
return '';
return `${location.fileName}:${location.lineNumber}:${location.columnNumber}`;
return `${YELLOW_COLOR}${location.fileName}:${location.lineNumber}:${location.columnNumber}${RESET_COLOR}`;
}

module.exports = Reporter;

0 comments on commit bc71e92

Please sign in to comment.