title: TypeError window.require is not a function - Angular Test with Electron
body: <p>I have an Angular project run with Electron. My code compiles and works nicely, and now I've come to test it. Before I even start writing tests, all the <code>'shouldCreate'</code> tests are failing with the message <code>&quot;TypeError: window.require is not a function&quot;</code>.</p>
  <p>I have seen <a href="https://stackoverflow.com/questions/56091343/typeerror-window-require-is-not-a-function/56095485">this post</a> and <a href="https://stackoverflow.com/questions/56265958/electronjs-window-require-not-a-function">this post</a>, as well as a few others on the matter, but none of them address what to do if it only fails in tests.</p>
  <p>How can I get my tests to succeed, even with my code having things like <code>window.require('fs')</code> and the like? Again, the code compiles and runs (at least in the dev environment) but my tests fail before I have written them</p>
  <p>TIA</p>
  <p>EDIT: My code is based off of <a href="https://github.com/maximegris/angular-electron" rel="nofollow noreferrer">this github project</a></p>