Replace class instantiation with object in JS tests
This commit is contained in:
committed by
Pavel Punegov
parent
1c4ecd287d
commit
dc8cb103c5
@@ -17,7 +17,7 @@ fun createScriptEngine(): ScriptEngine =
|
||||
NashornScriptEngineFactory().getScriptEngine("--language=es5", "--no-java", "--no-syntax-extensions")
|
||||
|
||||
fun ScriptEngine.overrideAsserter() {
|
||||
eval("this['kotlin-test'].kotlin.test.overrideAsserter_wbnzx$(new this['kotlin-test'].kotlin.test.DefaultAsserter());")
|
||||
eval("this['kotlin-test'].kotlin.test.overrideAsserter_wbnzx$(this['kotlin-test'].kotlin.test.DefaultAsserter);")
|
||||
}
|
||||
|
||||
fun ScriptEngine.runTestFunction(
|
||||
|
||||
Vendored
+1
-1
@@ -104,5 +104,5 @@ function runTest(testRunner, location) {
|
||||
}
|
||||
|
||||
function supplyAsserter(kotlinTest) {
|
||||
kotlinTest.kotlin.test.overrideAsserter_wbnzx$(new kotlinTest.kotlin.test.DefaultAsserter());
|
||||
kotlinTest.kotlin.test.overrideAsserter_wbnzx$(kotlinTest.kotlin.test.DefaultAsserter);
|
||||
}
|
||||
Reference in New Issue
Block a user