|
1 | 1 | package kyo.test
|
2 | 2 |
|
3 |
| -import zio.{Ref, ZIO} |
4 |
| - |
5 | 3 | // TODO Implement this with appropriate JS filesystem APIs after JVM version is finalized
|
6 |
| -private[test] object TestDebug { |
7 |
| - def print(executionEvent: ExecutionEvent, lock: TestDebugFileLock) = |
8 |
| - executionEvent match { |
9 |
| - case t: ExecutionEvent.TestStarted => |
10 |
| - write(t.fullyQualifiedName, s"${t.labels.mkString(" - ")} STARTED\n", true, lock) |
| 4 | +private[test] object TestDebug: |
| 5 | + def print(executionEvent: ExecutionEvent, lock: TestDebugFileLock): Unit < Any = |
| 6 | + executionEvent match |
| 7 | + case t: ExecutionEvent.TestStarted => |
| 8 | + write(t.fullyQualifiedName, s"${t.labels.mkString(" - ")} STARTED\n", true, lock) |
11 | 9 |
|
12 |
| - case t: ExecutionEvent.Test[_] => |
13 |
| - removeLine(t.fullyQualifiedName, t.labels.mkString(" - ") + " STARTED", lock) |
| 10 | + case t: ExecutionEvent.Test[?] => |
| 11 | + removeLine(t.fullyQualifiedName, t.labels.mkString(" - ") + " STARTED", lock) |
14 | 12 |
|
15 |
| - case _ => ZIO.unit |
16 |
| - } |
| 13 | + case _ => () |
17 | 14 |
|
18 |
| - private def write( |
19 |
| - fullyQualifiedTaskName: String, |
20 |
| - content: => String, |
21 |
| - append: Boolean, |
22 |
| - lock: TestDebugFileLock |
23 |
| - ): ZIO[Any, Nothing, Unit] = |
24 |
| - ZIO.unit |
| 15 | + private def write( |
| 16 | + fullyQualifiedTaskName: String, |
| 17 | + content: => String, |
| 18 | + append: Boolean, |
| 19 | + lock: TestDebugFileLock |
| 20 | + ): Unit < Any = |
| 21 | + () |
25 | 22 |
|
26 |
| - private def removeLine(fullyQualifiedTaskName: String, searchString: String, lock: TestDebugFileLock) = |
27 |
| - ZIO.unit |
| 23 | + private def removeLine(fullyQualifiedTaskName: String, searchString: String, lock: TestDebugFileLock): Unit < Any = |
| 24 | + () |
28 | 25 |
|
29 |
| - def createDebugFile(fullyQualifiedTaskName: String): ZIO[Any, Nothing, Unit] = |
30 |
| - ZIO.unit |
| 26 | + def createDebugFile(fullyQualifiedTaskName: String): Unit < Any = |
| 27 | + () |
31 | 28 |
|
32 |
| - def deleteIfEmpty(fullyQualifiedTaskName: String): ZIO[Any, Nothing, Unit] = ZIO.unit |
33 |
| -} |
| 29 | + def deleteIfEmpty(fullyQualifiedTaskName: String): Unit < Any = () |
| 30 | +end TestDebug |
0 commit comments