Testing Your RxCode – Testing Asynchronous Code

So far, we have have covered some operators that enable you, as a developer, to write unit tests and make your code more robust, but writing test cases may provide other benefits as well. For instance, writing test cases will make your concepts more clear. It might seem a bit like working in a lab where you state your expectations inside a test and then run your code to either meet or fail the expectations; this gives you more of a sense of how things are actually working under the hood.

You can play with your code, break it as many times as you want, and then refurbish it to achieve the desired result and finally, using tests, you can ensure that your work will achieve what you expected it ...

Get Reactive Programming with Swift 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.