Run / Debug is Creating Jest Configuration instead of Mocha

For some reason now when I try to run one test, it's creating a Jest configuration instead of mocha.  I can't tell why that is.  How do I fix this?  I'm definitely running mocha tests.'

WebStorm 2021.1.1
Build #WS-211.7142.46, built on April 30, 2021

Comment actions Permalink

The logic used for determining what test runner is available for a given test file is based on dependencies declarations in package.json nearest to the current file.
Do you have mocha listed among project dependencies?

Note that if you have a single package.json, with both jest and mocha included, jest is preferred.

Related ticket:

Comment actions Permalink

Please do not tell me Jest is preferred. The community does not all prefer Jest and this is really pathetic for all to hop on some bagwagon to say that we should be using Jest. I know many who are trying to rid Jest in fact.  Mocha runs much faster than jest and a lot of people hate Jest because it's so slow.

To tell us a preferred runner especially from JetBrains saying we should be using one test runner vs another, you know better than to do that.  You're supposed to keep neutral here.


Please sign in to leave a comment.