-
|
I have this sub-module configured https://github.com/Quafadas/scautable/tree/submodule. package build.scautable
import mill._
import mill.scalalib._
import mill.scalajslib._
import mill.scalajslib.api._
import build.Config
object `package` extends RootModule {
trait Common extends ScalaModule {
def scalaVersion = Config.scalaVersion
override def ivyDeps = super.ivyDeps() ++ Agg(
Config.scalatags,
Config.oslib,
Config.fansi
)
}
trait CommonJS extends Common with ScalaJSModule {
def scalaJSVersion = "1.19.0"
override def ivyDeps = super.ivyDeps() ++ Agg(
ivy"org.scala-js::scalajs-dom::2.8.0",
ivy"org.scala-js::scalajs-java-securerandom::1.0.0".withDottyCompat(scalaVersion()),
Config.laminar
)
}
trait SharedModule extends Common with PlatformScalaModule
trait SharedTest extends SharedModule with TestModule.Munit {
override def ivyDeps = super.ivyDeps() ++
Agg(
ivy"org.scalameta::munit::1.1.1"
)
}
object js extends CommonJS with SharedModule with build.PublishModule
object test extends Module {
object js extends CommonJS with SharedTest {
override def moduleDeps: Seq[JavaModule] = Seq(build.scautable.js)
}
}When I run this command; I get this error. My enquiry on discord, suggests that this is a symptom, of attempting to run scalaJS code, on the JVM. https://discord.com/channels/632150470000902164/635668814956068864/1370034019688775832 I cannot see, how this is misconfigured though. Is it? Could this be a bug? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
It seems that your test module doesn't extend |
Beta Was this translation helpful? Give feedback.
It seems that your test module doesn't extend
TestScalaJSModule, which overrides thetestTasktask to use the Scala.js test runner.When a test module is a inner module of a
ScalaJSModuleyou usually extendScalaJSTests, but here your module is not inside anotherScalaJSModule, so you need to extendTestScalaJSModule