showing line number information for failed tests.

This commit is contained in:
Jeremy Ashkenas 2011-05-01 10:11:56 -04:00
parent 7480f55e53
commit 9aa3b5b78c
1 changed files with 1 additions and 0 deletions

View File

@ -204,6 +204,7 @@ runTests = (CoffeeScript) ->
{error, file} = fail
jsFile = file.replace(/\.coffee$/,'.js')
match = error.stack?.match(new RegExp(fail.file+":(\\d+):(\\d+)"))
match = error.stack?.match(/on line (\d+):/) unless match
[match, line, col] = match if match
log "\n #{error.toString()}", red
log " #{error.description}", red if error.description