Hi I'm starting with Kotlin/JS and React and have ...
# javascript
l
Hi I'm starting with Kotlin/JS and React and have a problem writing tests, even when the code being tested have nothing to do with DOM, I get:
Copy code
Error: Target container is not a DOM element.
I found a possible solution in SO: https://stackoverflow.com/questions/61839800/unit-testing-in-kotlin-js But it's not ideal. Any ideas how to fix this?
u
the problem is that the content is not loaded up to the point when tests are triggered?
l
Not sure to be honest, first time I try to use js
But I get the exact same problem as in the stack overflow post and their fix does work, it just feels a bit hacky