diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/TestGenerator.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/TestGenerator.kt index 9e48282d670..5567986f770 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/TestGenerator.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/TestGenerator.kt @@ -56,7 +56,7 @@ class TestGenerator(val context: JsIrBackendContext) : FileLoweringPass { ): FunctionWithBody { val body = JsIrBuilder.buildBlockBody(emptyList()) - val function = JsIrBuilder.buildFunction("$name test fun", context.irBuiltIns.unitType, parentFunction) + val function = JsIrBuilder.buildFunction("$name test fun", context.irBuiltIns.anyNType, parentFunction) function.body = body val parentBody = parentFunction.body as IrBlockBody diff --git a/libraries/kotlin.test/js/src/main/kotlin/kotlin/test/TestApi.kt b/libraries/kotlin.test/js/src/main/kotlin/kotlin/test/TestApi.kt index ad340e5b460..05a4f4c74bd 100644 --- a/libraries/kotlin.test/js/src/main/kotlin/kotlin/test/TestApi.kt +++ b/libraries/kotlin.test/js/src/main/kotlin/kotlin/test/TestApi.kt @@ -53,7 +53,7 @@ internal fun suite(name: String, ignored: Boolean, suiteFn: () -> Unit) { } @JsName("test") -internal fun test(name: String, ignored: Boolean, testFn: () -> Unit) { +internal fun test(name: String, ignored: Boolean, testFn: () -> Any?) { adapter().test(name, ignored, testFn) }