-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ScalaJS testing #7
Comments
Thank you for your kind words!
Any suggestions for improving the plugin are more than welcome :) I am curious about you cross-building setup.
By gradle-scalates, do you mean the 'com.github.maiflai.scalatest' Gradle plugin? That is what I use... I do want to enhance this plugin to handle Node-run tests for ScalaJS (this is what this issue is about), Again, any clues and pointers are appreciated. |
Regarding cross-building, I should clarify that I'm writing a library, not an executable. And I only care about Scala 3 on JVM and ScalaJS. I'm intending on calling it from an separate JVM server application, and an separate JS browser application. I really don't want to duplicate code between the applications, as consistency across the environments is critical for me. Almost all my code is pure scala in a Currently, the One minor complaint is that I don't really want the
Yes. But I don't know much about it's guts. Because so much of my code is in shared, I can live with just JVM tests for some time, and I haven't looked into it much. So I have little to offer regarding hints. Sadly. I will post again here when I get a chance to do more homework. |
So do I ;)
Me too.
I think that the sbt approach (which should probably be followed as somewhat of a standard) is also to have three directories with 'src' under them: 'shared', 'jvm' and 'js'.... Only with Gradle, each of those directories probably will end up as subproject, so that sourcesets can be configured properly (shared+jvm and shared+js). Plugin should configure the sourcesets, compilation, linking, testing and packaging correctly, and I hope eventually it will.
Neither do I... ScalaTest itself is available for SclalaJS, but I suspect that Node-based tests will need to be run not by gradle-scalatest...
Thank you! (I won't be able to work on this for the next seven days.) |
@zstone1 I am working on the test functionality for the plugin; as expected, Gradle ScalaTest plugin is not going to help: ScalaJS tests run on Node; I am trying to integrate test adapters from ScalaJS with Gradle... |
Basic support is in version 0.0.2 of the plugin. |
Firstly, you saved me a lot of work figuring this out. So thank you.
I'm cross building with this plugin, which works reasonably well, but I don't yet have tests for the JS artifacts. Do you have a plan for running tests? Ideally, I'd just want a task like 'testJS', which runs my scalatest library in node. Is this something this plugin would handle? I currently use gradle-scalatest for JVM tests.
The text was updated successfully, but these errors were encountered: