I ran into this today, I was downgrading a angular service and using it in a angularjs module. all that was fine, but what was blowing up was in one test file was importing the actual module and not mocking it out. Once I removed the module from the test and mocked it instead the error was resolved.