From faacacbbac80269521d3b3dcf9eccae927ecd1b9 Mon Sep 17 00:00:00 2001 From: Matt Basta Date: Mon, 9 Dec 2013 11:33:04 -0800 Subject: [PATCH] Add error logging to unit test runner. --- test/unittests.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/unittests.js b/test/unittests.js index 63ebc80..89eac7c 100644 --- a/test/unittests.js +++ b/test/unittests.js @@ -1,3 +1,11 @@ +// Alert any errors during testing. +cobj.on('page.error', function(err, trace) { + console.error(err); + trace.forEach(function(item) { + console.log(' ', item.file, ':', item.line); + }); +}); + casper.start("http://localhost:8675/tests", function() { console.log('Started initial navigation.'); });