Why is require() undefined during karma tests but is ok during runtime? : <p>So I'm working on Angular 2 app, which is being written in TypeScript, and wrote some unit tests with Jasmine (also in TypeScript). After compilation all imports are translated to <code>require()</code>. When I run my app in the browser everything works fine, but when I try to run unit test with <code>karma</code> it says <code>Uncaught ReferenceError: require is not defined</code>. I've googled that and folks say it's because <code>karma</code> runs test in browser and browser doesn't know about <code>require()</code>, but why it works ok during runtime then?</p>
