From a22c9167219f3ad9ad6e844f92c3613531180819 Mon Sep 17 00:00:00 2001 From: Shagen Ogandzhanian Date: Wed, 25 Aug 2021 17:43:19 +0200 Subject: [PATCH] Use runTest in stypePosition test --- web/core/src/jsTest/kotlin/StaticComposableTests.kt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/web/core/src/jsTest/kotlin/StaticComposableTests.kt b/web/core/src/jsTest/kotlin/StaticComposableTests.kt index 76e8b9784b..1b5dc868ee 100644 --- a/web/core/src/jsTest/kotlin/StaticComposableTests.kt +++ b/web/core/src/jsTest/kotlin/StaticComposableTests.kt @@ -185,12 +185,10 @@ class StaticComposableTests { } @Test - fun stylesPosition() { - val root = "div".asHtmlElement() + fun stylesPosition() = runTest { val enumValues = Position.values() - renderComposable( - root = root - ) { + + composition { enumValues.forEach { position -> Span( { @@ -198,14 +196,14 @@ class StaticComposableTests { position(position) } } - ) { } + ) } } enumValues.forEachIndexed { index, position -> assertEquals( "position: ${position.value};", - (root.children[index] as HTMLElement).style.cssText + nextChild().style.cssText ) } }