Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Commit a96b554

Browse files
authored
Merge pull request #315 from exoego/scalafmt
Update scalafmt to v2.7.0
2 parents 9a36965 + d1a38ca commit a96b554

File tree

6 files changed

+25
-34
lines changed

6 files changed

+25
-34
lines changed

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "2.6.4"
1+
version = "2.7.0"
22
style = defaultWithAlign
33
maxColumn = 120
44
align.openParenDefnSite = true

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/child_process/ChildProcessTest.scala

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ class ChildProcessTest extends AsyncFunSpec {
3838
}
3939
}
4040
)
41-
promise.future.map {
42-
case (stdout, stderr) =>
43-
assert(stdout.toString.trim.toInt === 19)
44-
assert(stderr.toString.trim === "")
41+
promise.future.map { case (stdout, stderr) =>
42+
assert(stdout.toString.trim.toInt === 19)
43+
assert(stderr.toString.trim === "")
4544
}
4645
}
4746

@@ -58,10 +57,9 @@ class ChildProcessTest extends AsyncFunSpec {
5857
}
5958
}
6059
)
61-
promise.future.map {
62-
case (stdout, stderr) =>
63-
assert(stdout.toString.trim.linesIterator.length > 1)
64-
assert(stderr.toString.trim === "")
60+
promise.future.map { case (stdout, stderr) =>
61+
assert(stdout.toString.trim.linesIterator.length > 1)
62+
assert(stderr.toString.trim === "")
6563
}
6664
}
6765

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/dns/DNSAsyncTest.scala

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@ class DNSAsyncTest extends AsyncFunSpec {
3939
promise.success((hostname, service))
4040
}
4141
)
42-
promise.future.map {
43-
case (host, service) =>
44-
assert(host === "localhost")
45-
assert(service === "ssh")
42+
promise.future.map { case (host, service) =>
43+
assert(host === "localhost")
44+
assert(service === "ssh")
4645
}
4746
}
4847

@@ -64,16 +63,14 @@ class DNSAsyncTest extends AsyncFunSpec {
6463

6564
describe("DNS future extension") {
6665
it("supports lookupFuture") {
67-
DNS.lookupFuture(domain) map {
68-
case (ipAddress, ttl) =>
69-
assert(ttl > 0 && ipAddress.nonEmpty)
66+
DNS.lookupFuture(domain) map { case (ipAddress, ttl) =>
67+
assert(ttl > 0 && ipAddress.nonEmpty)
7068
}
7169
}
7270

7371
it("supports lookupServiceFuture:SSH") {
74-
DNS.lookupServiceFuture("127.0.0.1", 22) map {
75-
case (hostname, service) =>
76-
assert(hostname.nonEmpty && service.nonEmpty)
72+
DNS.lookupServiceFuture("127.0.0.1", 22) map { case (hostname, service) =>
73+
assert(hostname.nonEmpty && service.nonEmpty)
7774
}
7875
}
7976

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/fs/FsTest.scala

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@ class FsTest extends AsyncFunSpec {
3939
)
4040
)
4141

42-
promise.future.map {
43-
case (eventType, file) =>
44-
assert(eventType === "change")
45-
assert(file === "1.txt")
42+
promise.future.map { case (eventType, file) =>
43+
assert(eventType === "change")
44+
assert(file === "1.txt")
4645
}
4746
}
4847

@@ -96,9 +95,8 @@ class FsTest extends AsyncFunSpec {
9695
promise.success((Fs.statSync(file1), Fs.statSync(file2)))
9796
}
9897

99-
promise.future.map {
100-
case (stat1, stat2) =>
101-
assert(stat1.size === stat2.size)
98+
promise.future.map { case (stat1, stat2) =>
99+
assert(stat1.size === stat2.size)
102100
}
103101
}
104102

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/os/OSTest.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,9 @@ class OSTest extends AnyFunSpec {
5252
it("supports networkInterfaces()") {
5353
val networkInterfaces = OS.networkInterfaces()
5454
assert(isDefined(networkInterfaces))
55-
networkInterfaces foreach {
56-
case (name, iface) =>
57-
assert(name.nonEmpty)
58-
assert(iface.nonEmpty)
55+
networkInterfaces foreach { case (name, iface) =>
56+
assert(name.nonEmpty)
57+
assert(iface.nonEmpty)
5958
}
6059
}
6160

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/vm/VMTest.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ class VMTest extends AnyFunSpec {
2727

2828
val script = new Script("""count += 1; name = "kitty" + count""")
2929
val context = VM.createContext(sandbox)
30-
expectedSet foreach {
31-
case ExpectedData(animal, count, name) =>
32-
script.runInContext(context)
33-
assert(sandbox.animal === animal && sandbox.count === count && sandbox.name === name)
30+
expectedSet foreach { case ExpectedData(animal, count, name) =>
31+
script.runInContext(context)
32+
assert(sandbox.animal === animal && sandbox.count === count && sandbox.name === name)
3433
}
3534
}
3635

0 commit comments

Comments
 (0)