When I check if my observables are emitting what I need my unit tests. Should I unsubscribe inside my test?
I have always seen stuff like this:
it('my test should return 10', fakeAsync(() => {
let valueObtained;
sut.myObservable$.subscribe(newValue => {
valueObtained = newValue;
});
sut.act();
tick();
expect(valueObtained).toBe(10)
});
should I use there after the expect
an .unsubscribe
?