karma-requirejs
karma-requirejs copied to clipboard
Tests running twice
Hey thanks for the tutorial/demo!
I'm having an issue (I'm using grunt-karma) where when I open up the debug.html file, it's inserting this script tag:
<script type="text/javascript">
window.__karma__.loaded();
</script>
but since I'm now calling window.karma.start when require finishes, the tests are running twice (first time before require loads, and the second time correctly). What should I do to prevent the double start()?
Thanks!
BTW I did find a hack by putting this in the first line of test-main.js
but it just doesn't feel right...
window.__karma__.loaded = function () {};