edubkendo
9/10/2012 - 4:11 PM

test runner in coffeescript

test runner in coffeescript

#!/usr/bin/env coffee

terminal = require('child_process').exec

strings = [
  'test/cases/*/*.coffee',
  'test/cases/*.coffee',
  'test/cases/server/controller/*.coffee',
  'test/cases/server/command/*.coffee',
  'test/cases/server/generator/*.coffee',
  'test/cases/http/route/*.coffee'
]

for string in strings
  terminal("mocha #{string} -G --colors",
  (error, stdout, stderr) ->
    do (error, stdout, stderr) ->
      console.log stdout
      console.log stderr
  )