Closed kevinresol closed 8 years ago
@kevinresol I've made the changes and included the macro (thanks for the tip!), and it seems to work. Here are the tests, if that's all you think is needed, let me know and I'll release a new haxelib version:
https://github.com/ciscoheat/buddy/blob/master/src/buddy/tests/AllTests.hx#L928-L949
Yes, that's what I need at this very moment. But I think it is better to support other places as well (e.g. afterEach, etc), to be complete. Thanks for the quick response!
Now it's available on haxelib. And yes it would be nice to have for the whole API. If you have some time for that, please make a PR!
I am trying to use buddy with tink_await, like so:
In short, I need to be able to add a meta to the test spec function, as in
@:await function(done) ...
This is just a PoC so I only modified the macros for
describe
,beforeEach
andit
.P.S. It is a bit repetitive to type
buddy.BuddySuite.TestFunc.Async
andbuddy.BuddySuite.TestFunc.Sync
all over the place. Maybe avar sync = macro buddy.BuddySuite.TestFunc.Sync
may help. (use asmacro beforeEach($sync(someFunc))
)