Dmitrii Sorin
Dmitrii Sorin
Thanks for posting this issue @fasatrix. Still, it's not enough information to reproduce this issue. 1. Does it happen when you run tests in only one file testfile.ts? Can you...
This will be hard to reproduce since we have only these two things as an input: *mocha.opts* file ``` --reporter mocha-jenkins-reporter --timeout 300000 --require ts-node/register --require tsconfig-paths/register tests/**/*.ts ``` And...
Nah, let's keep it open so that someone can take a look at it.
@k03mad just in case you're feeling bored and want to try some completely new code ;)
Yes, you can do this with `--require` mocha option. Files which you specify in this option will be executed before parallel tests.
If I understand you correct, this is what you need: CLI: `mocha-parallel-tests --require base.js test/` base.js ``` before(function(){ return getOauthToken().then(function(token){ global.token = token; }); }); test/foo.js ``` describe('suite', () =>...
Gotcha. Double checked that, mocha doesn't wait until --require'd file finishes its execution, so in your case the quick way to get things done is this hack: ``` // base.js...
Nope, no easy way for now. I think it would be better to leave this issue open so that we can think of a better solution when we have time...
@erwinw I'm not 100% sure but this sounds like an expected behaviour of `mocha-parallel-tests` v2 because it runs each file in parallel. We can run this `--require`'d file inside the...
@erwinw right. Maybe that's a good area for `mocha-parallel-tests` improvement - some kind of lock/release API so that the processes can share some state between them. Right now using a...