The language the code is written in and the language integration and functional tests for this particular code are written in are two different beast and not necessarily those two languages are supposed to be the same. However usually it's still more convenient to use the same language for tests because it makes life in some aspects easier.
From what I see from the code you've provided the idea is to test a web application. There's a lot of options you have there but I will stop on two:
Selenium
Is the most known and one of the most mature test frameworks for QA. Selenium always had a support for tests written in Java. That said, it's actually pretty straightforward and easy task to write tests for Selenium in Kotlin. Here's an article that might help you if you decide to move in this direction.
It's important to understand though, that in this case in order to reuse code from Kotlin/JS you'll most likely will have to make it multi-platform (since Selenium Kotlin code would be a JVM code). However quite often it's very easy to separate code reusable by tests - most likely it would be resources, configs etc.
Puppeteer
Is one of few options we have for writing integration test for web applications in javascript. Well, to be strict, it's actually a test framework for testing code in Chrome. You can find a lot of examples of tests written in js for Puppetteer, if you'll choose to write in Kotlin you'll just have to introduce additional step for compiling tests written in Kotlin to javascript - exactly like you do when you right "regular" Kotlin/JS code.
kotlin.testis independant of the framework used.