Skip to content

Commit a9e0d50

Browse files
committed
Better output
1 parent 8b853f7 commit a9e0d50

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

scripts/printCommitStats.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function toRatioString(
120120
`${stats.get(type).numFile} files`,
121121
`${stats.get(type).numLineAdded} lines added`,
122122
`${stats.get(type).numLineAdded + stats.get(type).numLineRemoved} lines total`,
123-
`${toRatioString(stats.get(type).numLineAdded, stats.get(type).numLineRemoved)} lines added vs. removed`
123+
`${toRatioString(stats.get(type).numLineAdded, stats.get(type).numLineRemoved)}`
124124
].join(' | ')} |`
125125
);
126126
}
@@ -129,6 +129,12 @@ function toRatioString(
129129

130130
const [prodRatio, testRatio] = toRatio(stats.get('production').numLineAdded, stats.get('test').numLineAdded);
131131

132+
console.log(
133+
`Test to code ratio = ${toRatioString(stats.get('production').numLineAdded, stats.get('test').numLineAdded)}`
134+
);
135+
136+
console.log();
137+
132138
console.log(
133139
`${prodRatio === 0 || testRatio > prodRatio ? '😇' : '🚨'} There are ${chalk.magenta(toIntegerOrFixed(testRatio))} lines of test code added for every ${chalk.magenta(toIntegerOrFixed(prodRatio))} lines of production code added.`
134140
);

0 commit comments

Comments
 (0)