Supertest express tutorial | Node REST API testing

Publié le: 05 juillet 2021
sur la chaîne: Jan Goebel
20,930
319

🔥More exclusive content: https://productioncoder.com/you-decid...
Twitter:   / _jgoebel  
Website: https://jangoebel.com
Blog: https://productioncoder.com
Code: https://github.com/productioncoder/su...

00:00 using supertest to test your Node.js application
00:50 installing supertest and Jest
02:24 restructuring our project to make it ready for testing
04:14 writing integration tests with supertest
05:47 making a post request with supertest
06:25 assertions with jest and supertest
08:44 running our tests
09:06 conclusion

Today we cover how to use supertest with Node.js and Jest. In this express supertest tutorial we set our test environment and start making requests to an existing express server. Apart from assertions in Jest, we also talk about how to properly run and group tests by creating a custom test script you can put in your package.json file.


Sur cette page du site, vous pouvez voir la vidéo en ligne Supertest express tutorial | Node REST API testing durée online en bonne qualité , qui a été Téléchargé par l'utilisateur Jan Goebel 05 juillet 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 20,930 fois et il a aimé 319 téléspectateurs. Bon visionnage!