debug.js 856 B

1234567891011121314151617181920212223242526272829
  1. // Override the Karma setup for local debugging
  2. window.__karma__.info = function (info) {
  3. if (info.dump && window.console) window.console.log(info.dump)
  4. }
  5. window.__karma__.complete = function () {
  6. if (window.console) window.console.log('Skipped ' + this.skipped + ' tests')
  7. }
  8. window.__karma__.skipped = 0
  9. window.__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. for (var i = 0; i < result.log.length; i++) {
  17. // Printing error without losing stack trace
  18. (function (err) {
  19. setTimeout(function () {
  20. window.console.error(err)
  21. })
  22. })(result.log[i])
  23. }
  24. } : function () {}
  25. window.__karma__.loaded = function () {
  26. this.start()
  27. }