https://github.com/t-palmer/angular-unit-testing
This is a project for Angular Unit Test training.
- Create a service variable:
let service: BlankService; - Add
…after the main describe function description
- Add extra lines
- Surround configureTestingModule with
{} - Add semicolon after
- Add line to initialize service:
service = TestBed.get(BlankService);
- Add
–in front of the it() function description - Remove local service variable initialization
- Add
…after the main describe function description - Create a nativeElement variable for the Component Template:
let nativeElement: HTMLElement;
- Remove detectChanges
- Add extra lines to declarations
- Add line to initialize the nativeElement variable:
nativeElement = fixture.nativeElement; - Change should create to - should be created