Skip to content

Commit

Permalink
WIP try to improve error output. See #11
Browse files Browse the repository at this point in the history
  • Loading branch information
trusktr committed Aug 23, 2020
1 parent 9f9b285 commit 10bb7a5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions config/karma-helpful-error-output.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// const {remote} = require('electron')

window.addEventListener('error', err => {
console.log(err)
// remote.getGlobal('console').log(err)
})

// process.on('uncaughtException', err => {
// console.log(err)
// remote.getGlobal('global').console.log(err)
// })

// remote.getGlobal('global').process.on('uncaughtException', err => {
// console.log(err)
// remote.getGlobal('global').console.log(err)
// })
2 changes: 2 additions & 0 deletions config/karma.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ module.exports = function(config) {
// https://github.com/twolfson/karma-electron/issues/44.
path.resolve(__dirname, 'karma-augment-node-path.js'),

path.resolve(__dirname, 'karma-helpful-error-output.js'),

// Include all the test files *after* augment-node-path.js.
{pattern: 'dist/**/*.test.js', watched: false},
],
Expand Down

0 comments on commit 10bb7a5

Please sign in to comment.