Open prust opened 1 year ago
but it would be nice if it was documented in case others
Makes sense, feel free to raise a PR.
It doesn't support functions added to the
browser
object
Yes, you shouldn't do this.
It would add
await
places where it shouldn't, for example, before underscore functions andString.startsWith()
/.endsWith()
.
This is a bug and should be fixed. Any contributions would be much appreciated.
I recently used the async codemod to convert 2,500 lines of tests and found it to be inconsistent.
It would add
await
places where it shouldn't, for example, before underscore functions andString.startsWith()
/.endsWith()
.It would put
await
in the wrong place, for example beforeassert.equal()
instead of beforebrowser.getUrl()
:It doesn't support functions added to the
browser
object (though perhaps this is discouraged & therefore by design). For example, this function isn't converted to async, and calls to it don't get anawait
injected:It seems to assume the codebase is on WebDriver v7.9+ and can use a single async on chained calls. For example, it only injected two awaits here:
Perhaps this is a fair assumption, but it would be nice if it was documented in case others, like me, plan to upgrade to 7.9+ after the async codemod instead of before.