What's the best path to implement custom testing s...
# javascript
e
What's the best path to implement custom testing support for K/JS? I've seen KGP uses a combination of
KotlinTest
and
KotlinJsTestFramework
. Is extending those base classes the way?
c
What do you mean by custom testing?
e
Spawning a process that is not driven by Node.js.
c
Do you want to spawn that process from Gradle itself? What is that process for?
e
In the context of what I'm doing, that is trying to integrate VS Code development, testing is performed by invoking the main VS Code executable and passing in the entry point JS script. So the custom test task cannot use Node.js.
c
Copy code
val yourCustomTestTask by tasks.registering(Exec::class) {
    workingDir.set("…")
    commandLine.set("…")
}

tasks.check {
    dependsOn(yourCustomTestTask)
}
https://docs.gradle.org/current/dsl/org.gradle.api.tasks.Exec.html
e
I already do that, but having a proper test task (extending from
AbstractTestTask
) is better
I suppose
KotlinTest
integrates with Gradle too
@Adam S is this what you want to do?
a
yes! Let's continue in the other thread