Closed danlomantoSamsungNext closed 5 years ago
I've done some digging as well and I'm seeing test execution error out due to an error code of 12. Here's a screenshot of where I'm seeing this.
I've also create a repo that can reproduce this issue. Steps to reproduce are in the README.
Hi @danlomantoSamsungNext I think the problem is related to the -e flag (--eval). I cloned your repo and executed the function in REPL mode and it works. Also, you can create a small index.js file with the same line you are passing to --eval param (require("./.build/test-runner/run-tests.js").runTests()
) and it works too.
Is there any reason to execute the tests using --eval ??
Thanks for the reply @watson28 !
I think I'm a little confused. I'm not using the -e
or --eval
flag at all, as far as I can tell. Are you saying that I should be using the eval flag?
@danlomantoSamsungNext I was following the repo you posted https://github.com/DanLomanto/mocha-parallel-tests-repro.
In steps to reproduce, step 5, the tests are executed using node -e 'require("./.build/test-runner/run-tests.js").runTests()';
That's why I was talking about the -e
/--eval
flag.
Ohhhh I'm sorry! I was thinking about the actual mocha command. I'll give that a try. Thanks!!!
That was it, thanks!!!
@watson28 kudos for sorting this out!
I'm trying to run my tests in parallel programmatically, but it looks like the tests aren't being kicked off. When I run my tests just using pure
Mocha
, my tests run (in serial of course). However when I change my import to just usemocha-parallel-tests
, my tests are never actually started. To run my tests I just have a js function that wraps the kicking off of the tests. I'll put the sample code below.How Tests are Run:
Example Test:
When running that function using the regular
Mocha
library, that tests executes and I see the console output. When I change the function to usemocha-parallel-tests
, the test isn't started at all.Is there something that I'm missing? I'm sorta at a loss. Thanks for any help you might be able to provide!!!!