From a27f146338db076d74108e7af664135d51f5f86f Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Sun, 14 Mar 2010 09:33:41 -0700 Subject: [PATCH] fixing 'cake test' to print out the name of the file with the failing test. --- Cakefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Cakefile b/Cakefile index fdda0bf3..49b9550c 100644 --- a/Cakefile +++ b/Cakefile @@ -81,6 +81,10 @@ task 'test', 'run the CoffeeScript language test suite', -> time: ((new Date() - start_time) / 1000).toFixed(2) puts '\033[0;32mpassed ' + test_count + ' tests in ' + time + ' seconds\033[0m' fs.readdir 'test', (err, files) -> - for file in files + files.forEach (file) -> fs.readFile 'test/' + file, (err, code) -> - CoffeeScript.run code, {source: file} \ No newline at end of file + try + CoffeeScript.run code, {source: file} + catch err + puts "Failed test: $file" + throw err