How To Debug JavaScript Tests

In a Rider project with Angular installed and Karma as the test runner Rider states " Error: Cannot find module 'karma-sauce-launcher'" always when running unit tests even though the module is installed globally. What do I have to do to setup Rider so I can debug my JavaScript unit tests from the IDE with breakpoints?

3 comments
Comment actions Permalink

What does your run configuration look like? Does the issue persist if you run karma tests in terminal, what command do you use to do this?

0
Comment actions Permalink

I just run `npm test`. I also have configurations setup for `ng test`. Running these in the terminal work fine. The issue only exists in Rider. It seems like it's not finding node_modules at all.

0
Comment actions Permalink

>I just run `npm test`

 

what does your test script look like?

Please also attach a screenshot of your run configuration

0

Please sign in to leave a comment.