Supertest express tutorial | Node REST API testing

Publicado em: 05 Julho 2021
no canal de: 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.


Nesta página do site você pode assistir ao vídeo on-line Supertest express tutorial | Node REST API testing duração online em boa qualidade , que foi baixado pelo usuário Jan Goebel 05 Julho 2021, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 20,930 vezes e gostou 319 espectadores. Boa visualização!