Closed cayblood closed 8 years ago
Du you register the mock module in AngularJS ?
Do I need to? The docs say that no changes to your angular app are needed.
No, that was my point. The injection error is from Angular, so I suspected this to be the case. Can you supply the complete code base to study? I'd gladly help.
It's company code so I can't make it public, but I will try to reproduce the problem with a simple example and get back to you.
It occurs to me that I'm trying to mock out not just Ajax calls but the request for the app's main index page. I suppose this might be out of the scope of this project, right?
It doesn't sound right, to me at least. What is the purpose of this?
Thanks. I was trying to mock the initial page load, which doesn't make sense. Sorry for the trouble. I will try this out when I'm ready to test other ajax calls that are made after the app loads.
I'm trying to get a very basic mock setup working but it seems to be skipping the http mock altogether. The browser request executes normally and I get an error when selenium is not running. When I call
mock.requestsMade()
just to try to see what is happening, I get aModule 'httpMock' is not available
error. Any help you can provide would be greatly appreciated.Config:
Test:
Result: