JavaScript coroutine and async tests