this is a very straight forward way to explain testing with supertest. Thanks
@djvanschaik2 жыл бұрын
If you get a request not defined error, make sure to try: `const request = require('supertest')` instead of `const supertest = require('supertest')`. Other than that this is great!
@sheheerali7059 Жыл бұрын
i should have looked at this comment earlier😅
@nested930110 ай бұрын
"type":"module"
@leetcodeking4859 Жыл бұрын
Hi. I just move to California from China, this is the best video I seen on topic. Thank you friend.
@BlackDragon-rj4sc10 ай бұрын
I just started to create my first nodejs boilerplate with jest test and this video was very helpful to setup things
@JJP-lb3ek3 жыл бұрын
Exactly what i needed in my life right now. Thanks!
@VladBurlutsky3 жыл бұрын
Just did a random search and came across this video. Very good, Sam!Keep up the good work!
@jesuscama53542 жыл бұрын
Thanks for keeping it simple and clean. 🚀
@Sergio-ef5pz3 жыл бұрын
Great content mate! I'm on my first month as a backend dev with Node/Express and I'm looking forward to getting to know testing tools. Thanks for your explanation!
@debanjanbarman72123 жыл бұрын
Thanks, bro. It helped me. Keep up the good work.
@shahilhussain6466 Жыл бұрын
That was very quick and simple explanation and use case of Jest and SuperTest, thanks man!.
@wralith2 жыл бұрын
It was just what I was looking for. Thank you very much for the clear explanation.
@JigneshPatel-jr5bj3 жыл бұрын
Great, thanks for this video!
@SamMeechWard3 жыл бұрын
Glad you enjoyed it!
@brentryczak Жыл бұрын
Instant like after that first tip about the ports. That was my issue
@giachan45283 жыл бұрын
I like these testing tutorials with examples. Thanks
@SamMeechWard3 жыл бұрын
You are welcome 🤗
@babykosh5415 Жыл бұрын
THANK YOU for doing the pseudo code steps!
@realmonzeromer3 жыл бұрын
I was struggling with this Thank you so much for your hard work I subscribed
@ngneerin2 жыл бұрын
Have been trying to fix supertest with async app. Got fixed after watching this video
@matthewbeardsley70042 жыл бұрын
Having this as my script saved me hours!! Thanks!! "test": "NODE_OPTIONS=--experimental-vm-modules jest"
@alidemircix2 жыл бұрын
Why does not work only writing npm test for this. I spent about 2 hours to solve this problem but I don't know why do we use "test": "NODE_OPTIONS=--experimental-vm-modules jest" code
@Shailendrakumar-ge5cf Жыл бұрын
Thank you so much for the text version ♥
@kostiantynkarzhanov921610 ай бұрын
Very good tutorial! Thank you! 💛
@leandrodavimg2 жыл бұрын
Great video, simple and explained very well about supertest
@suhasvenkatesh78953 жыл бұрын
Awesome, simple to understand. Simplicity in explanation. Thanks
@debashisroyroy6523 жыл бұрын
helpFull .. Thank You. Expecting more nice things from you.
@utsavojha29533 жыл бұрын
Great video, great explanation !! Thanks 🤩
@scrice9081 Жыл бұрын
thanks man this is awesome!!!
@harmanmax2 жыл бұрын
Thanks mate , in windows i am using cross-env package and in package.json "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --watchAll"
@tech3425 Жыл бұрын
Thanks a lot for this! Would appreciate it if you could make a video regarding setup for this kind of test suite with Typescript-Express
@karinaillesova57063 жыл бұрын
Hi, this was great video to watch while creating my first tests for my API endpoints. It does however make changes to my actual database. Would you make a video on mongodb-memory-server please?
@guillaume5623 Жыл бұрын
Great content, thank you
@ayushpratap47263 жыл бұрын
waiting for the next part ! Try using Nest.JS with JEST Supertest.
@sammygopeh7578 Жыл бұрын
Lord! I cannot say thank you and enough
@SamMeechWard Жыл бұрын
consider becoming a channel member ;)
@danielsouza18242 жыл бұрын
Thank you very much, the NODE_OPTIONS=--experimental-vm-modules npx jest solved my problem 😓
@he016829363 жыл бұрын
Nice video, thanks :)
@zainhaider16332 жыл бұрын
hey great video but i wan to know how not to affect you actual DB during test?
@tom_c Жыл бұрын
Sam, great video! Thank you for contributing to the community... I am having a problem trying to reproduce the core of what you explained. For some reason the test fails saying that the request received a 404 but it should be a 403 (returned correctly testing it via postman). I think it has something to do with the routes and passing the app object to the request function of supertest... Any comments would be appreciated. Thank you in advance!
@jbkwon2 жыл бұрын
You are so awesome!
@12kenbutsuri3 жыл бұрын
Thank you for the tutorial. I'm a bit confused with one thing though, when was supertest ever used? wasn't everything here contained in jest?
@krsnyder1283 жыл бұрын
At 4:36 he mentions that the request function comes from supertest!
@12kenbutsuri3 жыл бұрын
@@krsnyder128 thank you! I missed that part.
@trant42 жыл бұрын
@@krsnyder128 Does not work for me, request is underfined
@alex-dk2rj3 жыл бұрын
Great stuff!
@prerakhere3 ай бұрын
is supertest used for unit or integration testing? i read at a lot of places on the internet that it is used for integration testing. i am confused.
@danielsouza18242 жыл бұрын
How to overcome "Jest did not exit one second after the test run has completed."? Now I'm facing this problem. Did you solve that?
@attilaszombathelyi37 ай бұрын
great job
@FredWang2 жыл бұрын
To use `import express from 'express'`, are you using the latest node version or by importing ESM ?
@lyflfflyflff2 жыл бұрын
He wrote "type": "module" at the package.json file. It tells node.js to use ECMAScript modules instead of a default CommonJS
@saulramirez7272 жыл бұрын
Supervideo of superset
@antimaaaato3 жыл бұрын
Nice video! Could you tell me your Node.js and jest, supertest versions?
@MattBodman2 жыл бұрын
Love the vids! What's the music in this one?
@nwigweuzochukwu60893 жыл бұрын
In a user registration flow that involves sending verification emails, i'm getting this type of error: thrown: "Exceeded timeout of 5000 ms for a test. I guess it's because of the email sender request and response but how do i fix this?
@RajendraPrasadyk2 жыл бұрын
Can we get video on with middleware supertest
@Codethier3 жыл бұрын
i owe you a beer mate
@JBeique2 жыл бұрын
TDD sure is SUPER with SUPER TESTS
@daniel.w81126 ай бұрын
where do we use jest here ?
@cannabisanomaly Жыл бұрын
Anyone been able to figure out how to use EJS syntax for importing/exporting on the backend instead of CJS? I still haven't been able to figure out how to configure that 😅
@clasesutnfrc86992 жыл бұрын
04:20 Request with supertest
@Mercio22 жыл бұрын
thanks
@aprilm29413 жыл бұрын
🤗
@SamMeechWard Жыл бұрын
🤗
@22SPORTSLIVE_102 жыл бұрын
Can someone help with some unit test plz
@TheSerikzhan2 жыл бұрын
nice
@ezeanichucks37285 ай бұрын
Dude, I hope I can repay you someday🎉
@eddyeffy Жыл бұрын
Something is wrong with your dependecies
@TenthFir Жыл бұрын
Why do you guys add music to a course video... I am here to learn. And even the music volume is more than your speech
@SamMeechWard Жыл бұрын
No guys, just me. I like the music 🤗
@ms.Mysh1 Жыл бұрын
I can’t concentrate because of your beautiful face 😅
@sohrabradmehrgaming15562 жыл бұрын
You should become a teacher or something
@SamMeechWard2 жыл бұрын
I don't think i'd be able to put up with the students