What are people using for testing react? I found a...
# javascript
g
What are people using for testing react? I found an old enzyme wrapper in a repo but I'm curious to hear from the community. Thanks!
t
There is no React 18 support for Enzume 😞
You can find wrappers link in related issue
g
Thanks for sending. It looks like the linked repo only supports render with props and not interactive tests (like checking state after simulating clicks). Am I reading that correctly?
r
@Gabriel Duncan I ended up rolling my own enzyme wrapper when I ported my project from typescript to kotlin (by hand, in 2019). I never really intended it to be sharable, but its here if you want to put eyes on it, its here https://github.com/robertfmurdock/testmints/blob/master/minenzyme/src/jsMain/kotlin/com/zegreatrob/minenzyme/EnzymeWrapper.kt
g
Awesome. @Rob Murdock I'll take a look. Thanks so much for sharing.
Oh I think I've found this before. But Victor is saying there's no react 18 support and we're going to be on react 18. 😞
But I can use this as a guide for wrapping something else
r
that’s all good - i can say that i’m using the current kotlin-wrappers versions of react et all and using this to test right now
no idea if all the features are working, but the ones i use are
… i’ll probably have to find a solution when react 18 drops
(non-enzyme solution, I mean)
g
This link is from Victor's issue ☝️ https://github.com/mysticfall/kotlin-react-test
👍 1