From 23c8433fce05f67231a7e425d67c67ae4e353a4d Mon Sep 17 00:00:00 2001 From: Ilya Goncharov Date: Tue, 21 Sep 2021 11:48:43 +0300 Subject: [PATCH] [JS IR] Eager initialization of adapter for kotlin.test tests --- js/js.translator/testData/box/kotlin.test/_common.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/js.translator/testData/box/kotlin.test/_common.kt b/js/js.translator/testData/box/kotlin.test/_common.kt index eb8913ab570..cec5ded2b45 100644 --- a/js/js.translator/testData/box/kotlin.test/_common.kt +++ b/js/js.translator/testData/box/kotlin.test/_common.kt @@ -14,7 +14,10 @@ fun raise(name: String): Nothing { throw Exception(name) } +// Adapter should be initialized eagerly @Suppress("INVISIBLE_MEMBER") +@OptIn(kotlin.ExperimentalStdlibApi::class) +@JsEagerInitialization private val underscore = kotlin.test.setAdapter(object : FrameworkAdapter { override fun suite(name: String, ignored: Boolean, suiteFn: () -> Unit) { sortingContext.suite(name, ignored) { suiteFn() }