I'm currently encountering a problem with an Observable that is based on the paramMap of my activatedRoute
this.current$ = this.route.paramMap.pipe(map(paramMap => paramMap.get('title')));
Everything works fine on the front-end, but now I am trying to write unit tests for my Angular component. My initial test setup looks like this:
beforeEach(() => {
fixture = TestBed.createComponent(BannerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeDefined();
});
it('should create', () => {
expect(component).toBeDefined();
});
However, when running the test, I keep getting the error message:
TypeError: Cannot read property 'pipe' of undefined
Despite having other simple tests set up, they all fail because of this issue. Am I overlooking something here?