Browse Source

For composition unit tests add container to the document

pull/771/head
Shagen Ogandzhanian 3 years ago
parent
commit
1315be6d5e
  1. 3
      web/core/src/jsTest/kotlin/TestUtils.kt

3
web/core/src/jsTest/kotlin/TestUtils.kt

@ -19,6 +19,9 @@ private val testScope = MainScope()
class TestScope : CoroutineScope by testScope {
val root = "div".asHtmlElement()
init {
document.body!!.appendChild(root)
}
fun composition(content: @Composable () -> Unit) {
root.clear()

Loading…
Cancel
Save