a little extra enhancement to cake test

This commit is contained in:
Michael Ficarra 2010-12-10 00:16:25 -05:00
parent 09c23a564d
commit 7ac1176120
1 changed files with 4 additions and 1 deletions

View File

@ -170,7 +170,10 @@ runTests = (CoffeeScript) ->
else
log "failed #{failures.length} and #{message}", red
for fail in failures
[match,line,column] = fail.error.stack.match(new RegExp(fail.file+":(\\d+):(\\d+)"))
match = fail.error.stack.match(new RegExp(fail.file+":(\\d+):(\\d+)"))
[match,line,column] = match if match
line ?= "unknown"
column ?= "unknown"
log " #{fail.file.replace(/\.coffee$/,'.js')}: line #{line}, column #{column}", red
console.log " #{fail.error.message}" if fail.error.message?
# output a cleaned-up version of the function source