From a36f3eb47408316686d1eeae4c54b6ca8edc54bd Mon Sep 17 00:00:00 2001 From: Daan Stolp Date: Fri, 25 Aug 2017 11:14:50 +0200 Subject: [PATCH] fix(debug-runner): support asynchronous tests in the debug runner Use console.error to log errors to the console instead of throwing an error. This makes sure that errors are scoped properly for asynchronous tests, instead of showing up as uncaught errors on all asynchronous tests. Fixes #2811 --- static/debug.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/debug.js b/static/debug.js index add06af58..cc9c7c965 100644 --- a/static/debug.js +++ b/static/debug.js @@ -15,10 +15,10 @@ window.__karma__.result = window.console ? function (result) { window.console.log(msg + result.suite.join(' ') + ' ' + result.description) for (var i = 0; i < result.log.length; i++) { - // Throwing error without losing stack trace + // Printing error without losing stack trace (function (err) { setTimeout(function () { - throw err + window.console.error(err) }) })(result.log[i]) }