-
Notifications
You must be signed in to change notification settings - Fork 186
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
Implement async. WIP #439
Implement async. WIP #439
Conversation
Currently, only IT blocks have async. More to follow. I need to figure out how to make blocks work properly with disconnected block ends. |
@o-lim @ajacksified , please review. |
I'm not sure what you mean by Maybe something like: local async, evloop
element.env.async = function(loop)
async = true
evloop = loop
element.env.done = done.new(loop.stop)
end
if pass then
local status = busted.status('success')
if busted.safe_publish('it', { 'test', 'start' }, element, parent) then
status:update(busted.safe('it', element.run, element))
if status:success() then
status:update(busted.safe('it', evloop.run, element))
end
if finally then
block.reject('pending', element)
status:update(busted.safe('finally', finally, element))
end
else
status = busted.status('error')
end
busted.safe_publish('it', { 'test', 'end' }, element, parent, tostring(status))
end Did you want to return |
Yeah, I did want to return done. I'm glad someone else is on board with that, I got some negative feedback when I suggested it earlier. I'm going to take another pass at this this week and see if I can nail this down finally. |
ping @DorianGray |
Any news about this? :) |
None. I have no time. Someone else please feel free to open a PR. |
Aww that's too bad - indeed with the current patch here the tests just seem to go on without waiting on the async one's completion. |
No description provided.