Technical requirements
This chapter assumes that you have a basic understanding of RxJS and unit testing in Angular using Jasmine. Follow this link for more information: https://angular.dev/guide/testing#set-up-testing.
Note
angular.dev will be the new documentation site for Angular developers; it offers updated features and documentation. angular.io will be deprecated in future releases.
We will be testing Observables in an Angular context. The source code for this chapter is available at https://github.com/PacktPublishing/Reactive-Patterns-with-RxJS-for-Angular-16-2nd-Edition/tree/main/Chap13.
We will be completing a unit test for the saveRecipe
method, which is available under the RecipesService
class. You can find the complete code in the recipes.service.spec
file.