A JSComRun instrumented for testing.
A JSRun instrumented for testing.
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.
import scala.concurrent.duration._ val kit = new TestKit(new MyEnv, 1.second) kit.withRun("""console.log("Hello World");""") { _.expectOut("Hello World\n") .closeRun() }
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.
A JSComRun instrumented for testing.
Create an instance of this class through one of the overloads of
TestKit.withComRun
orTestKit.startWithCom
.