Supertest express tutorial | Node REST API testing

Published: 05 July 2021
on channel: 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.


On this page of the site you can watch the video online Supertest express tutorial | Node REST API testing with a duration of online in good quality, which was uploaded by the user Jan Goebel 05 July 2021, share the link with friends and acquaintances, this video has already been watched 20,930 times on youtube and it was liked by 319 viewers. Enjoy your viewing!