Testing web applications is an important process to eliminate bugs. Tests ensure that the written code works as expected and the functionality is not broken on subsequent changes. They also help you to better understand the complex code you are working on. There are two main types of testing--unit testing and end-to-end (e2e) testing.
Unit testing is about testing isolated pieces of code. Unit tests normally use mocks for inputs and then assert that the expected results have occurred. The e2e approach executes tests against your application running in a real browser. Such tests assert that all pieces of code properly interact with each other. Standard test frameworks for Angular applications are Jasmine and Protractor. Jasmine is used for unit testing in combination with Karma-- a test runner for JavaScript. Protractor is an e2e test framework. This...