/
JUnitFramework.scala
38 lines (31 loc) · 1.1 KB
/
JUnitFramework.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* Scala.js (https://www.scala-js.org/)
*
* Copyright EPFL.
*
* Licensed under Apache License 2.0
* (https://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package com.novocode.junit
import sbt.testing._
/** Forwarder framework so no additional framework name is needed in sbt.
*
* Note that a type alias is not enough, since sbt looks at the runtime type.
*/
final class JUnitFramework extends Framework {
private val f = new org.scalajs.junit.JUnitFramework
val name: String = f.name
def fingerprints(): Array[Fingerprint] = f.fingerprints()
def runner(args: Array[String], remoteArgs: Array[String],
testClassLoader: ClassLoader): Runner = {
f.runner(args, remoteArgs, testClassLoader)
}
// Aka `workerRunner`; see the Scaladoc of `sbt.testing.Framework` about the name.
def slaveRunner(args: Array[String], remoteArgs: Array[String],
testClassLoader: ClassLoader, send: String => Unit): Runner = {
f.slaveRunner(args, remoteArgs, testClassLoader, send)
}
}