Vampire
01/16/2025, 4:28 PMjsNodeTest
task does not run any tests anymore but complains that no tests were run and in future Gradle version this will fail. 😕
Any idea how I can find out why no test are running?Artem Kobzar
01/16/2025, 4:28 PMVampire
01/16/2025, 4:30 PMVampire
01/16/2025, 4:31 PMVampire
01/16/2025, 4:32 PMVampire
01/16/2025, 4:32 PMVampire
01/16/2025, 4:32 PMVampire
01/16/2025, 4:34 PMIlya Goncharov [JB]
01/16/2025, 4:41 PMVampire
01/16/2025, 4:52 PMIlya Goncharov [JB]
01/16/2025, 4:54 PMVampire
01/16/2025, 10:42 PMVampire
01/17/2025, 1:40 AMIlya Goncharov [JB]
01/17/2025, 9:29 AMVampire
01/17/2025, 10:09 AMIlya Goncharov [JB]
01/17/2025, 10:34 AMkotest
is used, maybe it is related with it and kotest
does not generate running block in js
file
@Artem KobzarVampire
01/17/2025, 10:37 AMIlya Goncharov [JB]
01/17/2025, 10:39 AMbuild/js/packages/github-actions-typing-test/kotlin/github-actions-typing-test.mjs
Usually (when kotlin-test
is used) in the end there is block which just run some functions (test functions).
But in your sample I can see only JS declarations without any execution in JS sourcesVampire
01/17/2025, 10:41 AMIlya Goncharov [JB]
01/17/2025, 10:44 AMIlya Goncharov [JB]
01/17/2025, 10:45 AMVampire
01/17/2025, 10:47 AMIlya Goncharov [JB]
01/17/2025, 10:48 AMmain
function)
And probably when it does not work for you, you have something similar to my fileVampire
01/17/2025, 10:55 AMVampire [17:32 Uhr]
What the ...
Vampire [17:32 Uhr]
Now they run againI see that the main stuff was added. I did (yet another) change in the test code so it caused a recompilation and added it. While some minutes before the initial message in this thread there was a change where the main stuff was removed.
Vampire
01/17/2025, 10:55 AMIlya Goncharov [JB]
01/17/2025, 10:58 AMVampire
01/17/2025, 11:01 AMgradle compileTestKotlinJs --rerun compileTestDevelopmentExecutableKotlinJs --rerun
(as I was not sure which of the tasks does what) and now also miss the main stuff. Definitely something during compilationVampire
01/17/2025, 11:04 AMVampire
01/17/2025, 11:18 AMVampire
01/17/2025, 11:26 AMmain
method: https://github.com/kotest/kotest/blob/v5.9.1/kotest-framework/kotest-framework-mul[…]est/framework/multiplatform/embeddablecompiler/JsTransformer.ktVampire
01/17/2025, 11:26 AMVampire
01/17/2025, 12:24 PMdeclarationParent.getDeclarations().get(0).getSymbol().toString()
evaluates to
CLASS CLASS name:Ajv modality:FINAL visibility:public [external] superTypes:[kotlin.Any]
and the method is missing from the result.
Would be interesting to see what it is when it works, if I were just able to get to a working state. 🙄Vampire
01/17/2025, 12:26 PMVampire
01/17/2025, 1:00 PMIlya Goncharov [JB]
01/17/2025, 1:02 PMVampire
01/17/2025, 1:03 PMVampire
01/17/2025, 1:22 PMmain
method is added to the first file in the list of files which happens to be the Ajv.kt
.
Ajv.kt
is annotated with @file:JsModule("ajv")
.
And this then seems to somehow swallow the main
method.
If I remove the @file:JsModule("ajv")
annotation, the main
method appears in the output.
I guess in the cases where it worked, the first file happend to be not Ajv.kt
or jsonlint.kt
and then it worked.
If my assumption is right, the question is, whether it should work like kotest does it, or whether kotest should add the method to a different file like one where no such file annotation is present, or searching for one of the files that contains one of the specs.Vampire
01/17/2025, 1:22 PMVampire
01/17/2025, 7:56 PMVampire
01/20/2025, 3:12 PM