Mocking APIs in Tests with Nock

Publié le: 12 octobre 2022
sur la chaîne: CodingItWrong
2,418
27

In this video we talk about how to handle APIs when testing components—specifically in React Native, but the principles apply to any component-based UI. We talk about when you would and wouldn't want to mock APIs. We walk through using nock and talk about the mentality of testing the contract between frontend and backend. Then we compare nock to two alternate approaches to mocking APIs: Mock Service Worker and Jest module mocks.


Sur cette page du site, vous pouvez voir la vidéo en ligne Mocking APIs in Tests with Nock durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur CodingItWrong 12 octobre 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 2,418 fois et il a aimé 27 téléspectateurs. Bon visionnage!