0
I’m having difficulty executing unit test for the following function:
subscribeToUsuario(): void {
this.subscription.add(
this.store$.pipe(select(selectors.selectUsuario)).subscribe(state => {
if (!state || !state.usuario) return;
this.usuario = state.usuario;
})
);
}
In the Stanbul always hits as Function/statement not covered, what would be the ideal way to test this function?
Could you also post the contents of the unit test? The code posted is the one being tested, correct?
– Marcelo Vismari
what this Subscription would be?
– Eduardo Vargas