From 7ac1176120b2bbe8e4bc45db9756e350ac3897f3 Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Fri, 10 Dec 2010 00:16:25 -0500 Subject: [PATCH] a little extra enhancement to cake test --- Cakefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Cakefile b/Cakefile index fc7bb3f3..398a40ad 100644 --- a/Cakefile +++ b/Cakefile @@ -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