Running one test file before another
I have an npm script:
"exp-test": "node ./node_modules/mocha/bin/mocha test/lifecycle.test.js test/integration/experian.test.js"
I am trying to make a 'mocha' test configuration that runs the test the same way - starts lifecycle.test.js to bring up the sailsjs app, then runs experian.test.js.
I have tried the following settings:

I would think this would behave the same as the npm script, however the test run does not wait for lifecycle.test.js to lift the app before running the next test file, so the test fails since the app isn't running. I am using the sails.js framework, so it's required to lift sails before running the tests.
Anyone know how to do this properly?
The npm script works fine, but it's missing the fancy test GUI of PHPstorm / webstorm
Please sign in to leave a comment.
The main process run by your configuration is waiting for the exit code returned by a process added to Before launch, it won't start until it exits... Looks as if your first Mocha test return the exit code before the app is up and running?
I can only suggest starting tests manually one after another
You can also try using the Multirun plugin for running both configurations in one click, setting the appropriate order and delay