3
I would like to test tap() inside my Pipe to cover this code snippet, just missing it so that I reach 100% test coverage.
fromEvent(this.input.nativeElement, 'keyup')
.pipe(
debounceTime(150),
distinctUntilChanged(),
**tap(() => {
if (this.input.nativeElement.value.length > 2 || this.input.nativeElement.value.length == 0) {
this.paginator.pageIndex = 0;
this.loadAdmissionPage();
}
})**
)
.subscribe();
this.paginator.page
.pipe(
**tap(() => this.loadAdmissionPage())**
)
.subscribe();
I tried in many ways to test but was unsuccessful.
Put the unitary test you tried
– Eduardo Vargas