Skip to content

Commit

Permalink
JsonTest is now cross platform
Browse files Browse the repository at this point in the history
  • Loading branch information
ekrich committed Nov 23, 2023
1 parent 84da497 commit ed11c0b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
14 changes: 10 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ lazy val sconfig = crossProject(JVMPlatform, NativePlatform, JSPlatform)
if (isScala3.value) dotcOpts else scalacOpts
},
libraryDependencies ++= Seq(
"org.scala-lang.modules" %%% "scala-collection-compat" % scCompat
//"org.json4s" %%% "json4s-native" % "4.0.6" % Test
"org.scala-lang.modules" %%% "scala-collection-compat" % scCompat,
"org.json4s" %%% "json4s-native-core" % "4.0.6" % Test
),
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-s", "-v"),
// env vars for tests
Expand All @@ -131,7 +131,6 @@ lazy val sconfig = crossProject(JVMPlatform, NativePlatform, JSPlatform)
.jvmSettings(
crossScalaVersions := versions,
libraryDependencies ++= Seq(
"org.json4s" %% "json4s-native" % "4.0.6" % Test,
("io.crashbox" %% "spray-json" % "1.3.5-7" % Test)
.cross(CrossVersion.for3Use2_13),
"com.github.sbt" % "junit-interface" % "0.13.3" % Test
Expand Down Expand Up @@ -174,7 +173,14 @@ lazy val sconfig = crossProject(JVMPlatform, NativePlatform, JSPlatform)
"org.ekrich" %%% "sjavatime" % javaTime % "provided",
("org.scala-js" %%% "scalajs-weakreferences" % "1.0.0")
.cross(CrossVersion.for3Use2_13)
)
),
scalaJSLinkerConfig ~= {
_.withSemantics(
_.withAsInstanceOfs(
org.scalajs.linker.interface.CheckedBehavior.Compliant
)
)
}
)

lazy val `scalafix-rules` = (project in file("scalafix/rules"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import scala.jdk.CollectionConverters._
* Should be able to handle env vars for Scala.js with this:
* https://github.com/typelevel/cats-effect/blob/44545879b453c9a9b91d5d3c472b58b4ab04adb1/std/js/src/main/scala/cats/effect/std/EnvCompanionPlatform.scala#L38
*
* Commented out tests compile so should and fail on JS but should be supportable
* Commented out tests compile so should and fail on JS but should be
* supportable
*/
class ConfigSubstitutionSharedTest extends TestUtilsShared {
private def resolveWithoutFallbacks(v: AbstractConfigObject) = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -794,8 +794,6 @@ class ConfigValueSharedTest extends TestUtilsShared {
assertEquals(parseConfig("a=1,b.c=2,b.d=3,x.y.z=4"), config)
}



@Test
def renderWithNewlinesInDescription(): Unit = {
val v = ConfigValueFactory.fromAnyRef(
Expand Down

0 comments on commit ed11c0b

Please sign in to comment.