I have a test/ folder (marked as Test Sources Root) full of mocha tests files that test various parts of my codebase. For all but one of my files, I can right-click the file and Run or Debug it and WebStorm correctly runs it with mocha and give me a nice summary of the tests as they're running. I can also right-click on individual tests and intellij can then run or debug just that test. It's quite wonderful.
However it doesn't work for one particular file - when I right-click and run it, WebStorm treats it as a rebular node.js script and then it immediately fails with "ReferenceError: describe is not defined" - why is this? And how do I tell WebStorm to treat it like the rest of my test files?
This is the folder: https://github.com/watson-developer-cloud/node-sdk/tree/c6d334522fc1c86b55eb7bd0e88b85f23d7ce948/test
This is the file that isn't recognized: https://github.com/watson-developer-cloud/node-sdk/blob/c6d334522fc1c86b55eb7bd0e88b85f23d7ce948/test/test.integration-all-services.js
And, here's a variation of it in the branch I'm currently working on where I tried to make it look more like the other files but it didn't seem to change anything: https://github.com/watson-developer-cloud/node-sdk/blob/ac078b93dd9a6b800122eb7a99ec230e570c9612/test/test.zz.integration-all-services.js