WebStorm mocha test 'sh' is not recognized as an internal or external command

Viewed 5764

I'm trying to run a mocha test for my node.js code which runs the following line:

exec(`sh ${scriptFile}`);

When I run it from the command line (Git Bash) using npm test, it passes. However, when I run it from WebStorm I get the following error:

'sh' is not recognized as an internal or external command,
operable program or batch file.

I feel like I'm probably missing some WebStorm setting, but I can't figure out what it is. Any ideas?

P.S. I'm on Windows.

2 Answers
Related