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!
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!
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?
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
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?
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 😅
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!
this is a very straight forward way to explain testing with supertest. Thanks
Hi. I just move to California from China, this is the best video I seen on topic. Thank you friend.
Exactly what i needed in my life right now. Thanks!
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!
i should have looked at this comment earlier😅
"type":"module"
Just did a random search and came across this video. Very good, Sam!Keep up the good work!
Thanks for keeping it simple and clean. 🚀
It was just what I was looking for. Thank you very much for the clear explanation.
Thanks, bro. It helped me. Keep up the good work.
I just started to create my first nodejs boilerplate with jest test and this video was very helpful to setup things
That was very quick and simple explanation and use case of Jest and SuperTest, thanks man!.
Great, thanks for this video!
Glad you enjoyed it!
Great video, simple and explained very well about supertest
I like these testing tutorials with examples. Thanks
You are welcome 🤗
THANK YOU for doing the pseudo code steps!
I was struggling with this
Thank you so much for your hard work
I subscribed
Thank you so much for the text version ♥
helpFull .. Thank You. Expecting more nice things from you.
Thanks mate , in windows i am using cross-env package and in package.json "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --watchAll"
Very good tutorial! Thank you! 💛
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!
Great video, great explanation !! Thanks 🤩
Instant like after that first tip about the ports. That was my issue
Awesome, simple to understand. Simplicity in explanation. Thanks
thanks man this is awesome!!!
Great content, thank you
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.
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?
hey great video but i wan to know how not to affect you actual DB during test?
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
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?
At 4:36 he mentions that the request function comes from supertest!
@@krsnyder128 thank you! I missed that part.
@@krsnyder128 Does not work for me, request is underfined
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?
Lord! I cannot say thank you and enough
consider becoming a channel member ;)
waiting for the next part ! Try using Nest.JS with JEST Supertest.
Have been trying to fix supertest with async app. Got fixed after watching this video
Can we get video on with middleware supertest
where do we use jest here ?
Having this as my script saved me hours!! Thanks!!
"test": "NODE_OPTIONS=--experimental-vm-modules jest"
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
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?
To use `import express from 'express'`, are you using the latest node version or by importing ESM ?
He wrote "type": "module" at the package.json file. It tells node.js to use ECMAScript modules instead of a default CommonJS
great job
Nice video, thanks :)
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 😅
Great stuff!
04:20 Request with supertest
You are so awesome!
Can someone help with some unit test plz
Nice video!
Could you tell me your Node.js and jest, supertest versions?
Love the vids! What's the music in this one?
Supervideo of superset
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!
Thank you very much, the NODE_OPTIONS=--experimental-vm-modules npx jest solved my problem 😓
i owe you a beer mate
thanks
TDD sure is SUPER with SUPER TESTS
Something is wrong with your dependecies
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
No guys, just me. I like the music 🤗
nice
Dude, I hope I can repay you someday🎉
🤗
🤗
I can’t concentrate because of your beautiful face 😅
You should become a teacher or something
I don't think i'd be able to put up with the students
thanks
You're welcome!