Closed jedwards1211 closed 7 years ago
hooks won't get run around async commands.
Only beforeCommand and afterCommand hooks are being ignored in async mode. On the longterm I wanted to implement them in the WebdriverIO monad but it's super low priority.
I guess I'll just have to hope that fibers gets deprecated and abandoned someday.
Fibers has right now way more advantages compared to async/await. I love to write my test code fully synchronous. It provides super clear stacktraces and is easy to understand for non devs. We will see how JS evolves and how other opinions will shape the architecture of this project. I appreciate your opinion but truly believe that making anything more difficult and inconvenient makes it harder for others and that is not the intention I want to follow.
kind of resurrecting this, what's the status of beforeCommand and afterCommand in async mode? I tried and they don't seem to be called, is this still a low priority?
is this still a low priority?
Command hooks might be available in v5, any contributions are much appreciated
Please consider adding a warning about that behavior to the docs, otherwise, it's just guessing.
Nice, does this package being moved to the boneyard mean webdriverio will stop using fibers?
webdriverio will stop using fibers?
Never! Why should it?
Update on this issue: in didn't land in v5 but any contributions to make this happen are still appreciated.
Darn :wink: I'm still hoping fibers in node eventually becomes a thing of the past
I'm still hoping fibers in node eventually becomes a thing of the past
@jedwards1211 why do you think that? Fibers is beautiful and clears up all unnecessary await
s in my code. In v5 there will be no need for you to install fibers. You can work with async/await and it will be the same API. However you will have tons of unnecessary async awaits in your code.
My biggest complaint against fibers is that It prevents me from running my Wdio tests in a pure Alpine Docker container.
If I understand the code correctly, hooks won't get run around async commands.
wrapCommand
is basically the identity function for async commands: https://github.com/webdriverio/wdio-sync/blob/master/index.js#L153But for sync commands it calls hooks: https://github.com/webdriverio/wdio-sync/blob/master/index.js#L199
Is this right? I'm trying to work on an async-only version, and this seemed odd to me.