Skip to content

Commit cc2c4d5

Browse files
committed
Add a test with Scala.js 1.0.0.
1 parent 77bfcd8 commit cc2c4d5

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
scalaVersion in ThisBuild := "2.12.10"
2+
3+
lazy val bar =
4+
crossProject(JSPlatform, JVMPlatform)
5+
.crossType(CrossType.Pure)
6+
.in(file("."))
7+
.jsSettings(
8+
scalaJSUseMainModuleInitializer := true
9+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0")
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package sbttest
2+
3+
object Main {
4+
def main(args: Array[String]): Unit = {
5+
println("Hello")
6+
val vmVersion = System.getProperty("java.vm.version")
7+
println(vmVersion)
8+
9+
val isScalaJS = 1.0.toString() == "1"
10+
println(s"isScalaJS = $isScalaJS")
11+
if (isScalaJS)
12+
assert(vmVersion == "1.0.0")
13+
}
14+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> barJVM/run
2+
> barJS/run
3+
> barJS/testHtml

0 commit comments

Comments
 (0)