In terms of efficiency and code coverege, why would you write jasmine unit tests when you can write protractor e2e tests and mock out http requests, 3rd party API's etc'?
- You can make the same specific assertions such as in unit test because most of the asserted objects will have UI representation.
- You cover much larger flows (If I have a controller that runs a directive, that runs another directive...) .
- It saves time. E2E tests are much faster to write.
So i see much greater value to E2E tests with mocked http requests, yet most of the developer insist on writing unit tests.
What am I missing here?