This is a shallow test. We don't want to load child components as they are probably not even implemented yet.
Apply CUSTOM_ELEMENTS_SCHEMA
to allow unknown elements:
TestBed.configureTestingModule({
...
schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents();
Did you trigger change detection with fixture.detectChanges()
.
You can use of
function to create a hardcoded observable.
mock.mockReturnValue(of(42));
import '!style-loader!css-loader!@angular/material/prebuilt-themes/indigo-pink.css';