You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make FuncUnit use async/await rather than a queue system #229
I'd also like to throw in making it very functional.
importFuncUnitasFfrom"funcunit"test(asyncfunction(){awaitF.click(querySelector("#button"))awaitF.textContent(querySelector("#details"),"Hi there")assert(true,"text is hi there")})
F would just expose functions that return promises. await use would be expected. We'd have functions that would be similar to what we have now, but more DOM-focused APIs and less jQuery-focused APIs:
textContent instead of text
innerHTML instead of html
value instead val
I think we could get rid of many traversal methods. For example
awaitF.click(querySelector("#button"))awaitF.textContent(querySelector("#details").parentNode,"Hi there")assert(true,"text is hi there")
Though we still might want some form of "wait" with traversal:
awaitF.click(querySelector("#button"))details=awaitF.querySelector("#details")child=awaitF.querySelector(child,".someElement");// obviously this could be done with one callawaitF.textContent(child,"Hi there")assert(true,"text is hi there")
Activity
justinbmeyer commentedon Nov 1, 2018
I'd also like to throw in making it very functional.
Fwould just expose functions that return promises.awaituse would be expected. We'd have functions that would be similar to what we have now, but more DOM-focused APIs and less jQuery-focused APIs:textContentinstead oftextinnerHTMLinstead ofhtmlvalueinsteadvalI think we could get rid of many traversal methods. For example
Though we still might want some form of "wait" with traversal: