Great job Alfredo!
Few things I would try that might make your tests even shorter -
You can use fakeTime and flush() to remove the need of using the TestScheduler.
flush()
You can use the factory function subscribeSpyTo to subscribe and create the spy at the same time (and you can also auto-unsubscribe as well)
Let me know if it helps
Thank you, Shai!
I think it looks better, readable and fewer lines of code. Updated the article and repo.
I was not able to find subscribeSpyTo and used subscribeAndSpyOn instead.
subscribeSpyTo
subscribeAndSpyOn
Awesome Alfredo!
Try to update to the latest version (1.4.0) and you'll see subscribeSpyTo
Wooot!
I will update the repo and the article. Thanks!
Nice!
Pay attention that you've missed 1 subscribeAndSpyOn ... 😀
Thanks! it should be good now =)
Pair programming FTW! 💪😀
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great job Alfredo!
Few things I would try that might make your tests even shorter -
You can use fakeTime and
flush()
to remove the need of using the TestScheduler.You can use the factory function subscribeSpyTo to subscribe and create the spy at the same time (and you can also auto-unsubscribe as well)
Let me know if it helps
Thank you, Shai!
I think it looks better, readable and fewer lines of code. Updated the article and repo.
I was not able to find
subscribeSpyTo
and usedsubscribeAndSpyOn
instead.Awesome Alfredo!
Try to update to the latest version (1.4.0) and you'll see
subscribeSpyTo
Wooot!
I will update the repo and the article. Thanks!
Nice!
Pay attention that you've missed 1
subscribeAndSpyOn
... 😀Thanks! it should be good now =)
Pair programming FTW! 💪😀