Skip to content

Commit

Permalink
Skipped the newly added tests in DiagramsSpec.scala for scala-js and …
Browse files Browse the repository at this point in the history
…scala-native build, as they use Await.result.
  • Loading branch information
cheeseng committed Dec 28, 2022
1 parent e77bfa8 commit 091481b
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2591,11 +2591,14 @@ class DiagramsSpec extends AnyFunSpec with Matchers with Diagrams {
""".stripMargin)
}

// scala js and native does not support Await.result
// SKIP-SCALATESTJS,NATIVE-START
it("should invoke future one time only") {
var count = 0
assert(Await.result(Future { count = count + 1; 42 }, Duration(1, SECONDS)) == 42)
count shouldBe 1
}
// SKIP-SCALATESTJS,NATIVE-END

}

Expand Down Expand Up @@ -5062,11 +5065,14 @@ class DiagramsSpec extends AnyFunSpec with Matchers with Diagrams {
""".stripMargin)
}

// scala js and native does not support Await.result
// SKIP-SCALATESTJS,NATIVE-START
it("should invoke future one time only") {
var count = 0
assert(Await.result(Future { count = count + 1; 42 }, Duration(1, SECONDS)) == 42, "this is a clue")
count shouldBe 1
}
// SKIP-SCALATESTJS,NATIVE-END
}

describe("The assume(boolean) method") {
Expand Down Expand Up @@ -7532,11 +7538,14 @@ class DiagramsSpec extends AnyFunSpec with Matchers with Diagrams {
""".stripMargin)
}

// scala js and native does not support Await.result
// SKIP-SCALATESTJS,NATIVE-START
it("should invoke future one time only") {
var count = 0
assume(Await.result(Future { count = count + 1; 42 }, Duration(1, SECONDS)) == 42)
count shouldBe 1
}
// SKIP-SCALATESTJS,NATIVE-END
}

describe("The assume(boolean, clue) method") {
Expand Down Expand Up @@ -10002,11 +10011,14 @@ class DiagramsSpec extends AnyFunSpec with Matchers with Diagrams {
""".stripMargin)
}

// scala js and native does not support Await.result
// SKIP-SCALATESTJS,NATIVE-START
it("should invoke future one time only") {
var count = 0
assume(Await.result(Future { count = count + 1; 42 }, Duration(1, SECONDS)) == 42, "this is a clue")
count shouldBe 1
}
// SKIP-SCALATESTJS,NATIVE-END
}
}
}

0 comments on commit 091481b

Please sign in to comment.