How do you test JavaFX/TornadoFX apps? (someone is...
# tornadofx
a
How do you test JavaFX/TornadoFX apps? (someone is doing that, right?🙂 ) Do you use frameworks like
TestFx
? Or just tests for non-UI stuff? btw if I am following MVVM, is it normal to have async methods like that in ViewModel?
Copy code
fun loadTokens() {
        tokens.clear() // observable list

        runAsync(status) {
            loadSomeStuff(someData).tokens
        } ui {
            tokens.addAll(it)
        } fail {
            fire(ErrorEvent(it))
        }
    }
I tried to test this VM and found out that I can't do it because of async 🙂 Also I just noticed that I use
someData
(string property) inside async, which I guess is not very thread safe...