I have a project built in AngularJS and I want to add unit test using Jasmine and Karma. Everytime I try to run a test I get 'Failed to instantiate module' because in the source code I load a local json file using XMLHttpRequest but in the test the same function respond with a 404. The json is a configuration file so if it's not loaded all the app can not be loaded properly. I tried with $httpBackend to capture the GET request and answer with a custom json but seems that $httpBackend cannot capture the request.
EDIT
I think the problem is the same of this