Hey amazing article, I am doing my first assignment using node JS express and Mongo DB as a developer and doing Unit testing for the very first time as a newbie developer. This was the most effective article I found. Thank you, Paula. Also how should I run individual tests, npm test runs it on the whole right ? I
If you follow this guide, npm test will execute all the tests in the "tests" folder (as specified in the package.json). You can however add some parameters (like --testNamePattern) when running npm test to execute only one test. I'd recommend reading my article Mastering NPM Scripts to learn how pass parameters to an npm script.
Also, if your using VSCode, checkout the Jest extension. It let's you run and debug tests individually.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey amazing article, I am doing my first assignment using node JS express and Mongo DB as a developer and doing Unit testing for the very first time as a newbie developer. This was the most effective article I found. Thank you, Paula. Also how should I run individual tests, npm test runs it on the whole right ? I
In glad my article was helpful 😊.
If you follow this guide,
npm test
will execute all the tests in the "tests" folder (as specified in the package.json). You can however add some parameters (like --testNamePattern) when running npm test to execute only one test. I'd recommend reading my article Mastering NPM Scripts to learn how pass parameters to an npm script.Also, if your using VSCode, checkout the Jest extension. It let's you run and debug tests individually.