I finally got the setup of the AngularJS test environment, and I'm trying to check if the pages are working in my application. This includes patterns , routes , queries , directives , etc.
From what I found, when testing a working application, it turns out that most of the work requires mock. Although this is good, I would still like to check the actual templates and data from my application.
Whenever a GET call is made in my application, I get an error message:
Unexpected request: GET application/templates/home.html No more request expected Error: Unexpected request: GET application/templates/home.html
It turns out he can't load the request correctly. This is normal. From what, in my opinion, is happening, the test runner (testacular) cannot load the template file, since it is in a different environment (without an HTTP address). The only solutions I came across with how to fix this is to mute the request using the layout using the $ httpBackend service. Although this is useful for certain situations, I want to get the actual data.
Any idea on how to fix this?
source share