Skip to content

Commit

Permalink
Add a test with Scala.js 1.0.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrd committed Feb 10, 2020
1 parent 77bfcd8 commit cc2c4d5
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
scalaVersion in ThisBuild := "2.12.10"

lazy val bar =
crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Pure)
.in(file("."))
.jsSettings(
scalaJSUseMainModuleInitializer := true
)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0")
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package sbttest

object Main {
def main(args: Array[String]): Unit = {
println("Hello")
val vmVersion = System.getProperty("java.vm.version")
println(vmVersion)

val isScalaJS = 1.0.toString() == "1"
println(s"isScalaJS = $isScalaJS")
if (isScalaJS)
assert(vmVersion == "1.0.0")
}
}
3 changes: 3 additions & 0 deletions sbt-crossproject-test/src/sbt-test/new-api/scalajs-1.0.0/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> barJVM/run
> barJS/run
> barJS/testHtml

0 comments on commit cc2c4d5

Please sign in to comment.