metaltest/reporter/summaryreporter.js

25 lines
437 B
JavaScript
Raw Normal View History

2022-11-08 22:29:58 -05:00
import chalk from 'chalk'
2022-12-04 23:40:07 -05:00
2022-11-08 22:29:58 -05:00
const log = (...args) => process.stdout.write(...args)
2022-12-05 22:26:51 -05:00
const summaryreporter = () => {
2022-11-08 22:29:58 -05:00
const report = {
start: (title) => {
log(chalk.cyanBright(title) + ' ')
},
success: (test) => {
log(chalk.greenBright('✓ '))
},
fail: (test, e) => {
log(chalk.redBright('✗ '))
},
end: (stats) => {
2022-12-04 16:06:06 -05:00
log('\n')
2022-11-08 22:29:58 -05:00
}
}
return report
}
2022-12-05 22:26:51 -05:00
export { summaryreporter }