https://kotlinlang.org logo
#ktor
Title
# ktor
w

Waldemar Kornewald

10/10/2023, 2:56 PM
Hi, in my PR (https://github.com/ktorio/ktor/pull/3584) I was asked to also add a unit test, but I can’t find any existing unit test for NodeJS that sets up a test server. There is
TestWithKtor
and
embeddedServer
but that’s JVM-only. Just instantiating an
HttpClient
with a custom
nodeOptions.agent
value probably won’t be enough as a test, so how can I proceed? FYI @Rustam Siniukov
r

Rustam Siniukov

10/11/2023, 8:57 AM
You can add a test route inside
test/server/ClientTestServer.kt
. It will start automatically when you run tests. You may need to stop gradle daemon for the changes to make an effect there (
./gradlew --stop
)
w

Waldemar Kornewald

10/23/2023, 8:07 AM
Sorry, it’s taking so long. We’re in the middle of a big release and I’m swamped with work. Not sure when I’ll get to this. 😞