How to mock Pipe when testing Component
You can add your mockpipes in the declarations of the TestBed: TestBed.configureTestingModule({ declarations: [ AppComponent, MockPipe ], … The MockPipe needs to have the @Pipe decorator with the original name. import {Pipe, PipeTransform} from ‘@angular/core’; @Pipe({name: ‘pipename’}) class MockPipe implements PipeTransform { transform(value: number): number { //Do stuff here, if you want return value; } … Read more