diff --git a/src/ui/scan/printHealthScore.ts b/src/ui/scan/printHealthScore.ts index 076b13d..c419818 100644 --- a/src/ui/scan/printHealthScore.ts +++ b/src/ui/scan/printHealthScore.ts @@ -11,25 +11,29 @@ export function printHealthScore( json: boolean = false, ): boolean { let color = chalk.green; + let emoji = '๐Ÿ’š'; let label = 'Excellent health'; if (json) return false; if (score < 90) { color = chalk.yellow; - label = 'Good, but can improve'; + emoji = '๐Ÿ’›'; + label = 'Can improve'; } if (score < 70) { color = chalk.redBright; + emoji = '๐Ÿงก'; label = 'Needs attention'; } if (score < 40) { color = chalk.red; - label = 'Poor health โ€“ critical issues detected'; + emoji = '๐Ÿšจ'; + label = 'Poor health'; } - console.log('๐Ÿ’š Project Health Score:', color(`${score}/100`)); - console.log(` ${label}`); + console.log(`${emoji} ${color('Project Health Score:')} (${score}/100)`); + console.log(` ${color(label)}`); console.log(''); return true; } diff --git a/test/e2e/cli.healthscore.test.ts b/test/e2e/cli.healthscore.test.ts index c5b7643..76a3691 100644 --- a/test/e2e/cli.healthscore.test.ts +++ b/test/e2e/cli.healthscore.test.ts @@ -58,7 +58,7 @@ describe('Health Score', () => { const res = runCli(cwd, ['--scan-usage']); // Missing variables reduce score โ†’ should be < 100 - expect(res.stdout).toContain('๐Ÿ’š Project Health Score:'); + expect(res.stdout).toContain('๐Ÿ’› Project Health Score:'); expect(res.stdout).not.toMatch(/100\/100/); }); @@ -75,7 +75,7 @@ describe('Health Score', () => { const res = runCli(cwd, ['--scan-usage']); - expect(res.stdout).toContain('๐Ÿ’š Project Health Score:'); + expect(res.stdout).toContain('๐Ÿ’› Project Health Score:'); // High secrets should push score far down (<85) const match = res.stdout.match(/Health Score:\s.*?(\d{1,3})\/100/);