Before getting into the specifications and the mindset of the feature being delivered, it is important to understand the fundamentals of testing a component class. A component in Angular is a key feature used in most applications.
Our sample application (quickstart
) has some very basic test specs for unit and end-to-end testing. We will start the TDD approach from the very beginning, so we will not use any of the test specs and the existing component's code in our implementation.
For that, what can we do is just clean up this sample application, and we will just keep the folder structure and application bootstrap files.
So, first of all, we will have to remove the unit test file (app.component.spec.ts
) and end-to-end test files (app.e2e-spec.ts
). These are two test specs that existed in the application structure.