The hot and cold helpers create hot and cold observables respectively.

With a cold test observable, each subscriber receives the notifications represented in the marble diagram, played from the diagram’s beginning.

hot test observables are different. With a hot test observable, a subscriber receives only the notifications represented in the marble diagram that are at or after the time of subscription.

You can see how the two types are used by looking at some of the tests in the RxJS repository.

Here is one that uses cold observables. And here is another that uses hot observables. Note that with the hot test observable, the subscriber does not receive notifications that occur before the time of subscription.

RxJS core team member; front-end developer; mentor; speaker; open-source contributor

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store