UNPKG

856 BJavaScriptView Raw
1// Override the Karma setup for local debugging
2window.__karma__.info = function (info) {
3 if (info.dump && window.console) window.console.log(info.dump)
4}
5window.__karma__.complete = function () {
6 if (window.console) window.console.log('Skipped ' + this.skipped + ' tests')
7}
8window.__karma__.skipped = 0
9window.__karma__.result = window.console ? function (result) {
10 if (result.skipped) {
11 this.skipped++
12 return
13 }
14 var msg = result.success ? 'SUCCESS ' : 'FAILED '
15 window.console.log(msg + result.suite.join(' ') + ' ' + result.description)
16
17 for (var i = 0; i < result.log.length; i++) {
18 // Printing error without losing stack trace
19 (function (err) {
20 setTimeout(function () {
21 window.console.error(err)
22 })
23 })(result.log[i])
24 }
25} : function () {}
26window.__karma__.loaded = function () {
27 this.start()
28}