Throws more friendly error messages when call(Focused)Renderer() are invoked w/o a BrowserWindow.
Had a hard time adding tests for this, especially for the focused case (probably due to lacking Electron skills – never actually used it). Adding a simple t.throws(Async)() didn't work as BrowserWindow is only defined in the main process. And with more high-level integration tests it was a pain to reproduce a window not being focused. blur-ing the window didn't work (still had focus – even after timeout, awaiting corresponding event etc.).
I ended up hiding the whole window/app. Feel free to remove/edit tests if insufficient or add your own.
Throws more friendly error messages when
call(Focused)Renderer()
are invoked w/o aBrowserWindow
.Had a hard time adding tests for this, especially for the focused case (probably due to lacking Electron skills – never actually used it). Adding a simple
t.throws(Async)()
didn't work asBrowserWindow
is only defined in themain
process. And with more high-level integration tests it was a pain to reproduce a window not being focused.blur
-ing the window didn't work (still had focus – even after timeout, awaiting corresponding event etc.).I ended up hiding the whole window/app. Feel free to remove/edit tests if insufficient or add your own.
Closes #29