class
ScalaJSJUnitPlugin extends Plugin
Instance Constructors
-
new
ScalaJSJUnitPlugin(global: Global)
Value Members
-
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
-
final
def
==(arg0: Any): Boolean
-
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
val
components: List[PluginComponent]
-
val
description: String
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
val
global: Global
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
val
name: String
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
val
optionsHelp: Option[String]
-
def
processOptions(options: List[String], error: (String) ⇒ Unit): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
The Scala.js jUnit plugin is a way to overcome the lack of annotation information of any test class (usually accessed through reflection). This is all the information required by the Scala.js testing framework to execute the tests.
As an example we take the following test class:
Will generate the following bootstrapper module:
The test framework will identify
Foo$scalajs$junit$bootstrapper
as a test module because it extendsJUnitTestBootstrapper
. It will know which methods to run based on the info returned by Foo$scalajs$junit$bootstrapper.metadata, it will create new test instances usingFoo$scalajs$junit$bootstrapper.newInstance()
and it will invoke test methods usinginvoke
on the bootstrapper.