Packages

package kit

Type Members

  1. class ComRun extends Run

    A JSComRun instrumented for testing.

    A JSComRun instrumented for testing.

    Create an instance of this class through one of the overloads of TestKit.withComRun or TestKit.startWithCom.

  2. class Run extends AutoCloseable

    A JSRun instrumented for testing.

    A JSRun instrumented for testing.

    Create an instance of this class through one of the overloads of TestKit.withRun or TestKit.start.

  3. final class TestKit extends AnyRef

    TestKit is a utility class to simplify testing of JSEnvs.

    TestKit is a utility class to simplify testing of JSEnvs.

    It is mostly used by Scala.js' provided JSEnv test suite but it may be used for additional tests specific to a particular JSEnv.

    Example:
    1. import scala.concurrent.duration._
      
      val kit = new TestKit(new MyEnv, 1.second)
      kit.withRun("""console.log("Hello World");""") {
        _.expectOut("Hello World\n")
          .closeRun()
      }
    Note

    Methods in TestKit allow to take a string instead of an Input. The string is converted into an input form supported by the JSEnv to execute the code therein.

Ungrouped