25 lines
437 B
JavaScript
25 lines
437 B
JavaScript
|
import chalk from 'chalk'
|
||
|
|
||
|
const log = (...args) => process.stdout.write(...args)
|
||
|
|
||
|
const summaryreporter = () => {
|
||
|
|
||
|
const report = {
|
||
|
start: (title) => {
|
||
|
log(chalk.cyanBright(title) + ' ')
|
||
|
},
|
||
|
success: (test) => {
|
||
|
log(chalk.greenBright('✓ '))
|
||
|
},
|
||
|
fail: (test, e) => {
|
||
|
log(chalk.redBright('✗ '))
|
||
|
},
|
||
|
end: (stats) => {
|
||
|
log('\n')
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return report
|
||
|
}
|
||
|
|
||
|
export { summaryreporter }
|