anyone got an example of proper kotlin/js integrat...
# javascript
c
anyone got an example of proper kotlin/js integration tests?
r
what kind of tests are you imagining?
c
one where I'd spin a browser and assert that some ui elements are presents
r
if all you mean is "run tests in a browser context", the gradle js "browser" setup uses karma to do that, and you can use stuff like testing library to mount components and verify them individually if you mean something along the selenium / webdriver route, I've written some kotlin + gradle wrappers for using 'wdio'. haven't looked in a while, but AFAIK no one's tried to setup cypress with kotlin with preconfiguration yet
probably the path of least resistance for component integration testing is using the default karma setup plus testing library to mount at the level you'd like
c
I'm definitely on the karma route. I wanted some example code to bench from
r
I maintain a Kotlin "testing library" wrapper here: https://github.com/robertfmurdock/jsmints between the testing library wrapper and the user events wrapper you can do most basic things, following the normal testing library js patterns you can find some basic examples of using user events + testing library in the user events test here https://github.com/robertfmurdock/jsmints/blob/master/libraries/user-event-testing[…]/zegreatrob/wrapper/testinglibrary/userevent/BasicEventsTest.kt
🙌 1
c
Much appreciated!