You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I was creating tests for my angular app, it appeared there was no proper way to mock pipes. Therefore I've created an MockPipe function based on your MockComponent code.
Is this maybe you can use/add in your ng-mock-component code? See below the code:
import {Pipe, PipeTransform} from '@angular/core';
/**
* Examples:
* MockPipe('mypipe');
*/
export function MockPipe(name: string): any {
@Pipe({ name })
class MockPipe implements PipeTransform {
transform (input: any): any {
return input;
}
}
return MockPipe;
}
The text was updated successfully, but these errors were encountered:
Hi!
First of all, many thanks for your library.
When I was creating tests for my angular app, it appeared there was no proper way to mock pipes. Therefore I've created an MockPipe function based on your MockComponent code.
Is this maybe you can use/add in your ng-mock-component code? See below the code:
The text was updated successfully, but these errors were encountered: