Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (17 sloc) 599 Bytes
fs = require 'fs'
{print} = require 'util'
{spawn, exec} = require 'child_process'
# ANSI Terminal Colors
bold = '\033[0;1m'
green = '\033[0;32m'
reset = '\033[0m'
red = '\033[0;31m'
log = (message, color, explanation) ->
console.log color + message + reset + ' ' + (explanation or '')
test = (callback) ->
spec = spawn './node_modules/mocha/bin/mocha'
spec.stdout.on 'data', (data) -> print data.toString()
spec.stderr.on 'data', (data) -> log data.toString(), red
spec.on 'exit', (status) -> callback?() if status is 0
task 'test', ->
test -> console.log 'Done!'