Closed tiagolr closed 8 years ago
I've been thinking about the same thing, and beforeEach/afterEach
for every it
call, as it's done like that in other BDD frameworks. It's a rather big breaking change to make though...! I'll think about it for a little while. :)
Easier to add beforeAll and afterAll then, no breaking changes even if its unlike other frameworks out there, cheers.
Yes that could work, but I'm very careful about naming, and there is a chance beforeAll
is interpreted that it's run before all ("each one of the") it
, not just once. It's not bad though, I cannot come up with anything better. Let me know if you have any other ideas!
Actually beforeEach
is a bit unclear as well. beforeIt
is better, beforeEachIt
even better still but a bit long.
Naming stuff is not easy, before
and beforeEach
are looking good in other js frameworks, but breaking changes are not easy too.
I cannot come up with a better name than beforeAll
and endAll
atm, its not perfect but its using the before\after keyword and does not break changes, if i have another idea I'll shoot it.
Take your time, but please add this feature, my latest projects use buddy and they all miss feature, if breaking changes are made its ok, there should be a way to warn ppl upgrading tho. Thanks!
Thanks, I appreciate it. :)
Good news, I'm soon done with a rewrite of buddy, so version 1.0 will have beforeAll/afterAll
and beforeEach/afterEach
. I'll keep you posted!
Version 1.0.0 is released, now you'll have everything you need. :) Closing this now, but please re-open if you find any problems.
Buddy is looking great, congrats on your release! Seems to have all the base features (nested describe, beforeall/each etc..)
Thank you! I'm trying to stay as close to the Jasmine specifications as possible. There have been a few fixes lately, so make sure you upgrade for the next few days. The current version is 1.0.3.
It would be great if we could use before() and after() only once before and after a test suite.
beforeAll/afterAll or some other method name would work exactly like actual before() and after() but just once.
Thanks for considering.