{Front-end Unit Testing}
How to use Angular tooling to write unit tests in Jest
A unit test is an automated piece of code that invokes a unit of work in the system and then checks a single assumption about the behavior of that unit of work.
A unit of work is a single logical functional use case in the system that can be invoked by some public interface (in most cases). A unit of work can span a single method, a whole class, or multiple classes working together to achieve one single logical purpose that can be verified.
Mock
Isolate a piece of code from it's dependencies
Act
Perform an action to set the system in certain state
Assert
Compare result of code execution with desired result
Has full control over all the pieces running
Can be run in any order if part of many other tests
Runs in isolated (no BE access, for example)
Consistently returns the same result
Tests a single logical concept in the system
TestBed