KJS: add generateNodeJsRunner flag to BasicBoxTest to control the generating files for node.js runner
This commit is contained in:
@@ -63,7 +63,8 @@ abstract class BasicBoxTest(
|
||||
private val pathToTestDir: String,
|
||||
private val pathToOutputDir: String,
|
||||
private val typedArraysEnabled: Boolean = false,
|
||||
private val generateSourceMap: Boolean = false
|
||||
private val generateSourceMap: Boolean = false,
|
||||
private val generateNodeJsRunner: Boolean = true
|
||||
) : KotlinTestWithEnvironment() {
|
||||
val additionalCommonFileDirectories = mutableListOf<String>()
|
||||
|
||||
@@ -129,7 +130,7 @@ abstract class BasicBoxTest(
|
||||
val allJsFiles = additionalFiles + inputJsFiles + generatedJsFiles + globalCommonFiles + localCommonFiles +
|
||||
additionalCommonFiles
|
||||
|
||||
if (!SKIP_NODE_JS.matcher(expectedText).find()) {
|
||||
if (generateNodeJsRunner && !SKIP_NODE_JS.matcher(expectedText).find()) {
|
||||
val nodeRunnerName = mainModule.outputFileName(outputDir) + ".node.js"
|
||||
val ignored = InTextDirectivesUtils.isIgnoredTarget(TargetBackend.JS, file)
|
||||
val nodeRunnerText = generateNodeRunner(allJsFiles, outputDir, mainModuleName, ignored, testFactory.testPackage)
|
||||
|
||||
+2
-1
@@ -56,5 +56,6 @@ abstract class AbstractJsTypedArraysBoxTest : BasicBoxTest(
|
||||
abstract class AbstractSourceMapGenerationSmokeTest : BasicBoxTest(
|
||||
BasicBoxTest.TEST_DATA_DIR_PATH + "sourcemap/",
|
||||
"${BasicBoxTest.TEST_DATA_DIR_PATH}/out/sourcemap/",
|
||||
generateSourceMap = true
|
||||
generateSourceMap = true,
|
||||
generateNodeJsRunner = false
|
||||
)
|
||||
Reference in New Issue
Block a user