Skip to content

Commit b37c825

Browse files
committed
Fix tests
1 parent 6ab8f26 commit b37c825

File tree

5 files changed

+23
-20
lines changed

5 files changed

+23
-20
lines changed

CONTRIBUTING.md

+15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Contributing Guide
22

3+
## Running the tests
4+
5+
1. Update to latest scala-cli:
6+
```
7+
$ scala-cli update
8+
```
9+
or, if installed with Coursier:
10+
```
11+
$ cs update scala-cli
12+
```
13+
2. Run the tests:
14+
```
15+
$ scala-cli test tests/CrossPlatform.test.sscala
16+
```
17+
318
## Updating dependencies
419

520
1. You can update the Toolkit dependencies in `Toolkit.scala`, `Toolkit.js.scala` and `ToolkitTest.scala`. The versions in `Toolkit.scala` and `Toolkit.js.scala` should be the same.

tests/CrossPlatform.test.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using toolkit 0.3.0
1+
//> using toolkit 0.5.0
22
//> using scala 3.3
33

44
import scala.util.Try
@@ -9,7 +9,7 @@ class CrossPlatformTests extends munit.FunSuite:
99
requireCmd("scala-cli")
1010
test("jvm")(publishAndRun("jvm", "1.0.0-SNAPSHOT"))
1111
test("js")(publishAndRun("js", "1.0.0-SNAPSHOT", "--js"))
12-
test("native")(publishAndRun("native", "1.0.0-SNAPSHOT", "--native", "--native-version", "0.5.1"))
12+
test("native")(publishAndRun("native", "1.0.0-SNAPSHOT", "--native", "--native-version", "0.5.5"))
1313

1414
override val munitTimeout = Duration(120, "s")
1515

tests/js/RequestPost.sc

+2-6
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,5 @@ val request = quickRequest
1010
.body("Lorem ipsum")
1111

1212
for response <- request.send() do
13-
val firstLines = response.body.linesIterator.take(4).mkString("\n")
14-
println(firstLines)
15-
//$ <!doctype html>
16-
//$ <html>
17-
//$ <head>
18-
//$ <title>Example Domain</title>
13+
println(response.body.linesIterator.size)
14+
//$ 0

tests/jvm/RequestPost.sc

+2-6
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,5 @@ val response = quickRequest
77
.body("Lorem ipsum")
88
.send()
99

10-
val firstLines = response.body.linesIterator.take(4).mkString("\n")
11-
println(firstLines)
12-
//$ <!doctype html>
13-
//$ <html>
14-
//$ <head>
15-
//$ <title>Example Domain</title>
10+
println(response.body.linesIterator.size)
11+
//$ 0

tests/native/RequestPost.sc

+2-6
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,5 @@ val response = quickRequest
77
.body("Lorem ipsum")
88
.send()
99

10-
val firstLines = response.body.linesIterator.take(4).mkString("\n")
11-
println(firstLines)
12-
//$ <!doctype html>
13-
//$ <html>
14-
//$ <head>
15-
//$ <title>Example Domain</title>
10+
println(response.body.linesIterator.size)
11+
//$ 0

0 commit comments

Comments
 (0)