Closed maximilianschmitt closed 6 years ago
Thanks for reporting!
Hi @rogeliog, thanks for getting back to me!
it
s) written in the way described in the OPUsing mocha@4.0.1
by the way.
Any ideas?
I would very much expect the generator example to fail, since that's a pretty weird hack around mocha, which doesn't have generator support (n.b: generators aren't and can't be coroutines, and combining them with a runner is just faking it)
However, I would also very much expect the dynamic it
example to work identically, since that's just moving synchronous code around.
I'm sorry, the issue was something completely different:
If a promise is rejected (or an error is thrown) inside a beforeEach
or if timeout
is exceeded in a beforeEach
, you will see Your test suite must contain at least one test.
but the actual error will not be reported. I think I should create a separate issue for that?
@ljharb generators did turn out to be working as coroutines with co-mocha
, as did the dynamic it
s, like they should :) thanks!
Hi!
We're looking to parallelize our mocha-based test suite and we think that going with
jest
andjest-runner-mocha
might be the easiest way to get there.There is one problem we're running into and that is that Jest/Mocha are not picking up all the tests and so quite a few fail with
Your test suite must contain at least one test.
.The following types of tests are not being picked up:
1. Tests written with co-mocha in mind
Example (notice the generator function):
We've tried
require('co-mocha')(require('mocha'))
from our jest config file and also from withinjest-runner-mocha
but that didn't get us anywhere.2. Tests that generate the
it
call dynamicallyExample:
What can we do to have Jest/Mocha pick up those tests?
Thanks for your help!