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
Why not? For the tap you'd just have a test that emits a value to uploadTotalFailedFilesCompleted$ and then checks the component.failedFilesSuccessfulCount to see if it matches the value you emitted.
Your map call doesn't seem to be doing anything. It looks like you want to hit your service whenever you emit a new value. In that case you should be using switchMap instead of map so that you're not nesting calls. But I don't think your call is actually going to ever do anything as you don't subscribe to it. So subscribe, use the response of the service call, and then in your test you check for whatever it did. That may be as simple as mocking the callDocumentGroupPatch to just return an empty success and then in the test you check that the mocked method was called. You'd use a jest/jasmine spy object for that.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Good, I can't test the map and tap part of a pipe, does anyone know how I can mockear this part? with the function of doesn't work for me.
Beta Was this translation helpful? Give feedback.
All reactions