hello-kotlin-multiplatform
hello-kotlin-multiplatform copied to clipboard
No test classes are found for common and js projects on 'gradle test'
Tests fail to run in hello_lib_common
and hello_js_browser_app
.
JVM project tests seem to run correctly.
gradle test --info
...
> Task :hello_lib_common:testClasses UP-TO-DATE
Skipping task ':hello_lib_common:testClasses' as it has no actions.
:hello_lib_common:testClasses (Thread[Task worker for ':',5,main]) completed. Took 0.0 secs.
:hello_lib_common:test (Thread[Task worker for ':',5,main]) started.
...
> Task :hello_lib_jvm:testClasses UP-TO-DATE
Skipping task ':hello_lib_jvm:testClasses' as it has no actions.
:hello_lib_jvm:testClasses (Thread[Daemon worker Thread 9,5,main]) completed. Took 0.0 secs.
:hello_lib_jvm:test (Thread[Daemon worker Thread 9,5,main]) started.
Apologies for not showing this more convincingly, or succinctly, but gradle limits my options since it does not print out test results. (Or I don't know how to configure it to in a nice way).
Yes, I know about it. I'll try to use a newer tooling, maybe this was already fixed.
I've had a look around and this project seems to work for JS. https://github.com/jstuyts/kotlin-multiplatform-recipes
I'll let you know how it goes.
I got the above mentioned style of testing working with Qunit for a project containing a common-js, backend-js, and frontend-js module.
I also realised that it is non-sensical for tests to run in the common platform module, as there is no defined runtime.
It should be now working as expected with the latest Kotlin Multiplatform support. Tests running as a whole, now I have the results in the CircleCI also. https://app.circleci.com/pipelines/github/wojta/hello-kotlin-multiplatform/42/workflows/971fc480-50c3-42a6-aaf6-e1aa4b2e34f8/jobs/52/artifacts