Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5049

Set window property in karma config

$
0
0

I have a webpack typescript karma jasmine setup. The webpack entry-point is main.ts. In there i am calling

window.addEventListener('resize', () => {    [...]});

If i run the application it is fine.

If i run the tests with karma i receive this error:

Error during loading: Uncaught TypeError: Cannot read property 'addEventListener' of null

I don't know how to fix that. Grateful for any help!


Viewing all articles
Browse latest Browse all 5049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>