function printStatus(status: 'RUN' | 'PASS' | 'FAIL' | 'ERROR'): void { let statusText = colors.grey.bold('[ ] RUN') + ': '; if (status === 'PASS') { statusText = colors.green.bold('[\u2713] PASS') + ': '; // checkmark unicode } else if (status === 'FAIL') { statusText = colors.red.bold('[\u2717] FAIL') + ': '; // x unicode } else if (status === 'ERROR') { statusText = colors.bgRed(colors.white.bold('[!] ERROR')) + ':'; } reportStatus( statusText, format( colors.grey('(%d/%d tests. %d steps passed. %d steps failed)'), testsRun, totalTests, stepsPassed, stepsFailed, ), ); }
function printStatus(status: 'RUN' | 'PASS' | 'FAIL' | 'ERROR'): void { let statusText = colors.grey.bold("[ ] RUN")+": "; if (status === 'PASS') { statusText = colors.green.bold("[✓] PASS")+": "; } else if (status === 'FAIL') { statusText = colors.red.bold("[✗] FAIL")+": "; } else if (status === 'ERROR') { statusText = colors.bgRed(colors.white.bold("[!] ERROR"))+":"; } reportStatus( statusText, format( colors.grey("(%d/%d tests. %d steps passed. %d steps failed)"), testsRun, totalTests, stepsPassed, stepsFailed, ), ); }
git.events.on('command', function(command) { log('info', colors.grey('git: '))(colors.grey.bold(command)); });