process.stdout.write(data)
})
+child.on('error', function (err) {
+ console.log(chalk.red(err))
+})
+
child.on('exit', function (code) {
if(code === 0){
console.log(chalk.yellow('🐶 ✓ Tests run well, we can commit...'))
} else {
console.log(chalk.yellow('🐶 ✗ Tests are failing, please fix them before committing.'))
+ process.exit(code);
}
})
-
-child.on('error', function (err) {
- console.log(chalk.red(err))
-})
\ No newline at end of file
process.stdout.write(data)
})
+child.on('error', function (err) {
+ console.log(chalk.red(err))
+})
+
child.on('exit', function (code) {
if(code === 0){
console.log(chalk.yellow('🐶 ✓ Tests run well, we can push...'))
} else {
console.log(chalk.yellow('🐶 ✗ Tests are failing, please fix them before pushing.'))
+ process.exit(code);
}
})
-
-child.on('error', function (err) {
- console.log(chalk.red(err))
-})
\ No newline at end of file