How to mock a real backend http request. Follow the below steps:
Clone the repository:
https://github.com/leandroh/angularjs-e2e-mock
Install dependencies:
npm install
Start a static web server to run the test application:
npm start
Open a new terminal window and start up the Selenium Server:
./node_modules/.bin/webdriver-manager start
Run the tests against the sample application in a new terminal window:
npm test