~ Move Wasm diagnostics tests from test-common-new
diff --git a/compiler/tests-common-new/build.gradle.kts b/compiler/tests-common-new/build.gradle.kts
index 9c8ec7b..8df3fa3 100644
--- a/compiler/tests-common-new/build.gradle.kts
+++ b/compiler/tests-common-new/build.gradle.kts
@@ -57,12 +57,6 @@
     dependsOn(":dist")
     workingDir = rootDir
     useJUnitPlatform()
-
-    // Kotlin/Wasm stdlib and kotlin.test are not included in ":dist"
-    dependsOn(":kotlin-stdlib-wasm:compileKotlinWasm")
-    systemProperty("kotlin.wasm.stdlib.path", "libraries/stdlib/wasm/build/classes/kotlin/wasm/main")
-    dependsOn(":kotlin-test:kotlin-test-wasm:compileKotlinWasm")
-    systemProperty("kotlin.wasm.kotlin.test.path", "libraries/kotlin.test/wasm/build/classes/kotlin/wasm/main")
 }
 
 testsJar()
diff --git a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt
index 37d07bd..1b9cc8c 100644
--- a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt
+++ b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt
@@ -38,10 +38,6 @@
                 model("diagnostics/testsWithJsStdLib", excludedPattern = excludedCustomTestdataPattern)
             }
 
-            testClass<AbstractDiagnosticsWasmTest> {
-                model("diagnostics/wasmTests", excludedPattern = excludedCustomTestdataPattern)
-            }
-
             testClass<AbstractDiagnosticsTestWithOldJvmBackend> {
                 model(
                     "diagnostics/testsWithJvmBackend",
diff --git a/js/js.tests/build.gradle.kts b/js/js.tests/build.gradle.kts
index a699a74..9621b7c 100644
--- a/js/js.tests/build.gradle.kts
+++ b/js/js.tests/build.gradle.kts
@@ -486,6 +486,7 @@
     setupSpiderMonkey()
 
     include("org/jetbrains/kotlin/js/testOld/wasm/semantics/*")
+    include("**/DiagnosticsWasmTestGenerated*")
 
     dependsOn(":kotlin-stdlib-wasm:compileKotlinWasm")
     systemProperty("kotlin.wasm.stdlib.path", "libraries/stdlib/wasm/build/classes/kotlin/wasm/main")
@@ -494,6 +495,7 @@
     systemProperty("kotlin.wasm.kotlin.test.path", "libraries/kotlin.test/wasm/build/classes/kotlin/wasm/main")
 
     setUpBoxTests()
+    useJUnitPlatform()
 }
 
 projectTest("invalidationTest", jUnitMode = JUnitMode.JUnit4) {
diff --git a/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt b/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt
index 7b5c985..514191b 100644
--- a/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt
+++ b/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt
@@ -13,6 +13,7 @@
 import org.jetbrains.kotlin.js.test.*
 import org.jetbrains.kotlin.js.test.fir.*
 import org.jetbrains.kotlin.js.test.ir.*
+import org.jetbrains.kotlin.js.test.wasm.diagnostics.AbstractDiagnosticsWasmTest
 import org.jetbrains.kotlin.js.testOld.AbstractDceTest
 import org.jetbrains.kotlin.js.testOld.compatibility.binary.AbstractJsKlibBinaryCompatibilityTest
 import org.jetbrains.kotlin.js.testOld.wasm.semantics.*
@@ -237,5 +238,11 @@
 //                model("debug/stepping")
 //            }
         }
+
+        testGroup("js/js.tests/tests-gen", "compiler/testData") {
+            testClass<AbstractDiagnosticsWasmTest> {
+                model("diagnostics/wasmTests")
+            }
+        }
     }
 }
diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/AbstractDiagnosticsWasmTest.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/wasm/diagnostics/AbstractDiagnosticsWasmTest.kt
similarity index 92%
rename from compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/AbstractDiagnosticsWasmTest.kt
rename to js/js.tests/test/org/jetbrains/kotlin/js/test/wasm/diagnostics/AbstractDiagnosticsWasmTest.kt
index ec3504d..262fbac 100644
--- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/AbstractDiagnosticsWasmTest.kt
+++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/wasm/diagnostics/AbstractDiagnosticsWasmTest.kt
@@ -1,9 +1,9 @@
 /*
- * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
+ * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
  * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
  */
 
-package org.jetbrains.kotlin.test.runners
+package org.jetbrains.kotlin.js.test.wasm.diagnostics
 
 import org.jetbrains.kotlin.platform.js.WasmPlatforms
 import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
@@ -15,6 +15,7 @@
 import org.jetbrains.kotlin.test.frontend.classic.handlers.OldNewInferenceMetaInfoProcessor
 import org.jetbrains.kotlin.test.model.DependencyKind
 import org.jetbrains.kotlin.test.model.FrontendKinds
+import org.jetbrains.kotlin.test.runners.AbstractKotlinCompilerTest
 import org.jetbrains.kotlin.test.services.JsLibraryProvider
 import org.jetbrains.kotlin.test.services.configuration.CommonEnvironmentConfigurator
 import org.jetbrains.kotlin.test.services.configuration.WasmEnvironmentConfigurator
diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsWasmTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/diagnostics/DiagnosticsWasmTestGenerated.java
similarity index 80%
rename from compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsWasmTestGenerated.java
rename to js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/diagnostics/DiagnosticsWasmTestGenerated.java
index 485adda..713799b 100644
--- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsWasmTestGenerated.java
+++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/diagnostics/DiagnosticsWasmTestGenerated.java
@@ -3,7 +3,7 @@
  * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
  */
 
-package org.jetbrains.kotlin.test.runners;
+package org.jetbrains.kotlin.js.test.wasm.diagnostics;
 
 import com.intellij.testFramework.TestDataPath;
 import org.jetbrains.kotlin.test.util.KtTestUtil;
@@ -14,14 +14,14 @@
 import java.io.File;
 import java.util.regex.Pattern;
 
-/** This class is generated by {@link org.jetbrains.kotlin.test.generators.GenerateCompilerTestsKt}. DO NOT MODIFY MANUALLY */
+/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateJsTestsKt}. DO NOT MODIFY MANUALLY */
 @SuppressWarnings("all")
 @TestMetadata("compiler/testData/diagnostics/wasmTests")
 @TestDataPath("$PROJECT_ROOT")
 public class DiagnosticsWasmTestGenerated extends AbstractDiagnosticsWasmTest {
     @Test
     public void testAllFilesPresentInWasmTests() throws Exception {
-        KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/wasmTests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(fir|ll)\\.kts?$"), true);
+        KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/wasmTests"), Pattern.compile("^(.+)\\.kt$"), null, true);
     }
 
     @Nested
@@ -30,7 +30,7 @@
     public class JsInterop {
         @Test
         public void testAllFilesPresentInJsInterop() throws Exception {
-            KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/wasmTests/jsInterop"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(fir|ll)\\.kts?$"), true);
+            KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/wasmTests/jsInterop"), Pattern.compile("^(.+)\\.kt$"), null, true);
         }
 
         @Test