-
Notifications
You must be signed in to change notification settings - Fork 15.7k
Description
Checks
- This is not a duplicate of an existing issue (please have a look through our open issues list to make sure)
- I have thoroughly read and understand The Odin Project Contributing Guide
- Would you like to work on this issue?
Describe your suggestion
This lesson described supertest without actually differentiating clearly between it and testing frameworks like Jest/Mocha etc. An unsuspecting learner like me, reads the text of the lesson and doesn't realise that supertest doesn't work the same as these testing frameworks. The lesson doesn't actually also say that in order to run the supertest code samples given, we need a testing framework (Jest) to be installed and setup first.
This led me to make a couple of mistakes when trying out the lesson.
1- I didn't know that Supertest was not able to actually run the tests
2- Once I clarified on discord that I needed a test framework, I thought I should make use of vitest with the sample code (but that sample code doesn't actually work with vitest as you cannot use done with vitest).
Perhaps most of this would have been avoided if I'd had more experience with testing, but I'm not sure many of us do.
It was remarked on discord that this question (of how to run the sample code in the lesson) has come up before. I confirmed this.
An addition of a sentence to this lesson to mention the need for a test framework to use with Supertest and to instruct that Jest is required for the sample code would be helpful and appreciated.
thank you for your attention
Path
Node / JS
Lesson Url
https://www.theodinproject.com/lessons/nodejs-testing-routes-and-controllers
(Optional) Discord Name
hana-banana
(Optional) Additional Comments
No response