Skip to content

Commit a36f3eb

Browse files
daanstolpdignifiedquire
authored andcommitted
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
1 parent 523d608 commit a36f3eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

static/debug.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ window.__karma__.result = window.console ? function (result) {
1515
window.console.log(msg + result.suite.join(' ') + ' ' + result.description)
1616

1717
for (var i = 0; i < result.log.length; i++) {
18-
// Throwing error without losing stack trace
18+
// Printing error without losing stack trace
1919
(function (err) {
2020
setTimeout(function () {
21-
throw err
21+
window.console.error(err)
2222
})
2323
})(result.log[i])
2424
}

0 commit comments

Comments
 (0)