How to run async tests?
endel opened this issue · comments
Endel Dreyer commented
Hi @britzl, thanks as always for your time for developing tooling around Defold.
I have a question regarding async()
tests. The busted
documentation mentions the usage of async()
/ done()
(http://olivinelabs.com/busted/#async-tests)
But when using it in deftest
I get this error:
attempt to call global 'async' (a nil value)
Is there a different way of calling async()
/ done()
through your wrapper?
Cheers!
Björn Ritzl commented
Hi @endel ! Deftest is using Telescope, not Busted! Each test is run using a coroutine which means that you should be able to use coroutine.yield() and coroutine.resume(co) when writing async tests.