Sometimes it is necessary to override templates during testing. Angular has now simplified overriding templates, as follows:
TestBed.overrideTemplate(BookComponent, '<h1>{{book.title}}</h1>');
Before that, we need to build JSON and pass it.
Sometimes it is necessary to override templates during testing. Angular has now simplified overriding templates, as follows:
TestBed.overrideTemplate(BookComponent, '<h1>{{book.title}}</h1>');
Before that, we need to build JSON and pass it.