Create a New Configuration
- Node Interpreter: This should autofill
- Working Directory: I have this set up to the same place as my package.json. This may or may not be the root of your project.
- Mocha Package: This should autofill to the mocha directory in
- User Interface: select whatever style you use in your tests: https://mochajs.org/#interfaces
- Test File Patterns: This is the same pattern that I would use if I ran the tests from the command line
How To See Your Tests After Running Them
Click "Show Passed" and "Expand All." You can double-click on a test to view the test in your editor.
If you have a project with more than one set of tests, create a compound Run/Debug Configuration so you can run multiple test suites at once. https://www.jetbrains.com/help/idea/creating-compound-run-debug-configuration.html