-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recipe for moving from Mocha #558
Comments
I'm also coming from frameworks which use I tried nesting a failing test within an empty test which just passes as an organizational experiment. test('parent', (t) => {
test('child', (tc) => {
tc.fail();
});
}); The lack of contexts is certainly not a deal breaker as the features presented with AVA are compelling enough for me to switch. But in regards to writing a recipe for Mocha converts, it might be difficult with the current API. Arguably if AVA forces me to write smaller test files which represent more narrowly focused context, that's probably a good thing. |
@philmill: Does that still happen if you do something like test('parent', (t) => {
test('child', (tc) => {
tc.fail();
t.end();
});
}); ? |
Hey thanks for the suggestion @talexand, but the test still passes (results in infinite loop in call back mode). Also requiring calls to To be clear, I'm not really suggesting this as a solution to organization. It's just the first thing I tried after looking over the available API and searching for others who have tried similar contextual organization in AVA. I'm thinking this isn't how tests are intended to be structured and possibly not on the road map either (which is fine). |
// @kentcdodds |
Nice! We should create an "Avoid beforeEach" recipe and link to that video! |
Most people already use Mocha and will need some guidance on how AVA is different and how to achieve the same thing with it. We should have a recipe for this.
Any Mocha converts interested in helping out with this?
The text was updated successfully, but these errors were encountered: