diff --git a/js/js.translator/src/org/jetbrains/kotlin/js/translate/test/JSTestGenerator.kt b/js/js.translator/src/org/jetbrains/kotlin/js/translate/test/JSTestGenerator.kt index a97c2245c65..249065ba9dd 100644 --- a/js/js.translator/src/org/jetbrains/kotlin/js/translate/test/JSTestGenerator.kt +++ b/js/js.translator/src/org/jetbrains/kotlin/js/translate/test/JSTestGenerator.kt @@ -136,10 +136,10 @@ class JSTestGenerator(val context: TranslationContext) { get() = annotationFinder("Ignore", "kotlin.test") private val FunctionDescriptor.isBefore - get() = annotationFinder("Before", "kotlin.test") + get() = annotationFinder("BeforeTest", "kotlin.test") private val FunctionDescriptor.isAfter - get() = annotationFinder("After", "kotlin.test") + get() = annotationFinder("AfterTest", "kotlin.test") private fun DeclarationDescriptor.annotationFinder(shortName: String, vararg packages: String) = packages.any { packageName -> annotations.hasAnnotation(FqName("$packageName.$shortName")) diff --git a/libraries/kotlin.test/js/it/src/test/kotlin/MainTest.kt b/libraries/kotlin.test/js/it/src/test/kotlin/MainTest.kt index a862a3c23d2..f2f9828eaef 100644 --- a/libraries/kotlin.test/js/it/src/test/kotlin/MainTest.kt +++ b/libraries/kotlin.test/js/it/src/test/kotlin/MainTest.kt @@ -5,11 +5,11 @@ var value = 5 class SimpleTest { - @Before fun beforeFun() { + @BeforeTest fun beforeFun() { value *= 2 } - @After fun afterFun() { + @AfterTest fun afterFun() { value /= 2 } diff --git a/libraries/kotlin.test/js/src/main/kotlin/kotlin/test/Annotations.kt b/libraries/kotlin.test/js/src/main/kotlin/kotlin/test/Annotations.kt index 7eda3a9c37a..80b6d1a4cc8 100644 --- a/libraries/kotlin.test/js/src/main/kotlin/kotlin/test/Annotations.kt +++ b/libraries/kotlin.test/js/src/main/kotlin/kotlin/test/Annotations.kt @@ -29,9 +29,9 @@ public annotation class Ignore /** * Marks a function to be invoked before each test. */ -public annotation class Before +public annotation class BeforeTest /** * Marks a function to be invoked after each test. */ -public annotation class After \ No newline at end of file +public annotation class AfterTest \ No newline at end of file