Skip to content

Commit ff08f73

Browse files
committed
Changed TaskRunner in js to use Reflect instead.
1 parent 11cd9bd commit ff08f73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scalatest.js/src/main/scala/org/scalatest/tools/TaskRunner.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import org.scalatest.events.{TestFailed,
2626
SeeStackDepthException}
2727
import org.scalatest.tools.StringReporter._
2828
import sbt.testing._
29-
import org.scalajs.testinterface.TestUtils
29+
import scala.scalajs.reflect.Reflect
3030
import org.scalatest._
3131
import java.util.concurrent.atomic.AtomicInteger
3232
import scala.concurrent.Promise
@@ -78,7 +78,7 @@ println("GOT TO THIS RECOVER CALL")
7878

7979
def executionFuture(eventHandler: EventHandler, loggers: Array[Logger]): Future[Unit] = {
8080
val suiteStartTime = Platform.currentTime
81-
val suite = TestUtils.newInstance(task.fullyQualifiedName, cl, Seq.empty)(Seq.empty).asInstanceOf[Suite]
81+
val suite = Reflect.lookupInstantiatableClass(task.fullyQualifiedName).getOrElse(throw new RuntimeException("Cannot load suite class: " + task.fullyQualifiedName)).newInstance().asInstanceOf[Suite]
8282
val sbtLogInfoReporter = new SbtLogInfoReporter(
8383
loggers,
8484
presentAllDurations,

0 commit comments

Comments
 (0)