I've mentioned this in a thread, but thought more ...
# react
e
I've mentioned this in a thread, but thought more people might be interested. I've successfully written tests for a React component written in Kotlin. It uses Enzyme. Example test: https://github.com/epabst/kotlin-showcase/blob/5d5129e556c8b168b0a0b838eec694664af37902/src/jsTest/kotlin/todo/ToDoScreenTest.kt. The external bindings for enzyme are here: https://github.com/epabst/kotlin-showcase/tree/5d5129e556c8b168b0a0b838eec694664af37902/src/jsTest/kotlin/enzyme.
👍 2
a
wooow, thank you much much. I tried Enzyme back on 1.3.40, it got messy
r
Oh I have lots of these if people are curious, using some minor sugar I’ve written for myself. My enzyme sugar is here: https://github.com/robertfmurdock/testmints/blob/master/minenzyme/src/jsMain/kotlin/com/zegreatrob/minenzyme/EnzymeWrapper.kt
e
@Rob Murdock Very cool! I also like the idea of how you separated the tests into 3 sections.
☺️ 1
r
That section thing is available as a library if you want to toy with that style