Fixed JS test runner: save only stdlib module from run to run.
This commit is contained in:
@@ -164,12 +164,17 @@ public final class RhinoUtils {
|
|||||||
versionToScope.put(version, parentScope);
|
versionToScope.put(version, parentScope);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// reset declared modules
|
|
||||||
NativeObject kotlin = (NativeObject) parentScope.get("Kotlin");
|
NativeObject kotlin = (NativeObject) parentScope.get("Kotlin");
|
||||||
|
assert kotlin != null;
|
||||||
NativeObject modules = (NativeObject) kotlin.get("modules");
|
NativeObject modules = (NativeObject) kotlin.get("modules");
|
||||||
|
assert modules != null;
|
||||||
|
String stdlibModuleName = "kotlin_lib_compiled";
|
||||||
|
NativeObject stdlibModule = (NativeObject) modules.get(stdlibModuleName);
|
||||||
|
|
||||||
modules.setAttributes("JS_TESTS", 0);
|
NativeObject newModules = new NativeObject();
|
||||||
modules.remove("JS_TESTS");
|
newModules.put(stdlibModuleName, newModules, stdlibModule);
|
||||||
|
|
||||||
|
kotlin.put("modules", kotlin, newModules);
|
||||||
}
|
}
|
||||||
return parentScope;
|
return parentScope;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user