-1

How do I get the code inside the skipWhile to show as covered by istanbul? I'm using Angular, jasmine and rxjs 6. It can be a completely trivial test as long as the coverage stat shows its covered.

ngOnInit() {      
this.claimSubscription = this.store.pipe(select(ClaimStoreSelectors.selectClaim),
         skipWhile(
            clm =>
               clm.claimId !== this.route.snapshot.params['id']
         ))
         .subscribe(claim => {
//unimportant for the question
      });
}
user935618
  • 65
  • 1
  • 7

1 Answers1

0

Answer was to extract the contents of skipWhile into its own function, then istanbul doesn't complain about it. I never figured out the original question, but this solution will do.

user935618
  • 65
  • 1
  • 7