TypeError: this.route.paramMap.pipe is not a function #49123

28 views Asked by At

I am using activated route in my code as below,

this.route.paramMap.pipe(
switchMap((params: ParamMap) =>

while writing isolated test case i am getting below error

TypeError: this.route.paramMap.pipe is not a function

I am mocking route object as below,

const routeSpy = jasmine.createSpyObj(['paramMap']);

How can i resolve the above issue?

I am mocking route object as below,

const routeSpy = jasmine.createSpyObj(['paramMap']);
0

There are 0 answers