luisfarzati/angulartics — pull request #208 by theWickedWebDev (2014-09-26 20:15:46+00:00)
Title: changed _kmq declaration

The code was breaking when running tests with Karma. It works fine with the app tho. But while running Karama, it wasn't finding the _kmq array at all. Even when I tried to inject it into the tests. I was getting the following error:

ReferenceError: Can't find variable: _kmq
at /usr/local/web/src/src/vendor-bower/angulartics/dist/angulartics-kissmetrics.min.js:6

By changing the way this variable is declared allowed me to successfully run and test the code.