DEV Community

loading...

Discussion on: Testing Node.js + Mongoose with an in-memory database

Collapse
paulasantamaria profile image
Paula Santamaría Author • Edited

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.

Forem Open with the Forem app