dimanche 18 février 2018

Rxjs marble testing

Trying to understand what is the best way to unit test RXjs 5 subscription. So for example, if I have a complex observables chain and some business logic inside the subscribe block, how should I test it? the options I see are:

  1. Use Test scheduler with advanceBy operators (similar to how you would do it in rxjs 4)
  2. Marble testing, but as far as i understand marble testing only cover the observable so you can test what is going to be the output of the observable chain according to a specific input, but this test doesnt cover the subscription block...

any advice or ideas will be very helpful

Aucun commentaire:

Enregistrer un commentaire