diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/base/src/test/kotlin/renderers/html/GroupWrappingTest.kt | 29 | ||||
-rw-r--r-- | plugins/base/src/test/kotlin/renderers/html/PlatformDependentHintTest.kt | 8 |
2 files changed, 32 insertions, 5 deletions
diff --git a/plugins/base/src/test/kotlin/renderers/html/GroupWrappingTest.kt b/plugins/base/src/test/kotlin/renderers/html/GroupWrappingTest.kt index eead07a7..da89a352 100644 --- a/plugins/base/src/test/kotlin/renderers/html/GroupWrappingTest.kt +++ b/plugins/base/src/test/kotlin/renderers/html/GroupWrappingTest.kt @@ -1,5 +1,6 @@ package renderers.html +import kotlinx.coroutines.runBlocking import org.jetbrains.dokka.base.renderers.html.HtmlRenderer import org.jetbrains.dokka.pages.TextStyle import org.jsoup.Jsoup @@ -18,7 +19,12 @@ class GroupWrappingTest: RenderingOnlyTestBase() { text("c") } - HtmlRenderer(context).render(page) + runBlocking { + val scope = this + with(HtmlRenderer(context)) { + scope.render(page) + } + } renderedContent.match("abc") } @@ -33,7 +39,12 @@ class GroupWrappingTest: RenderingOnlyTestBase() { text("c") } - HtmlRenderer(context).render(page) + runBlocking { + val scope = this + with(HtmlRenderer(context)) { + scope.render(page) + } + } renderedContent.match(P("ab"), "c") } @@ -48,7 +59,12 @@ class GroupWrappingTest: RenderingOnlyTestBase() { text("c") } - HtmlRenderer(context).render(page) + runBlocking { + val scope = this + with(HtmlRenderer(context)) { + scope.render(page) + } + } renderedContent.match(Div("ab"), "c") } @@ -68,7 +84,12 @@ class GroupWrappingTest: RenderingOnlyTestBase() { } } - HtmlRenderer(context).render(page) + runBlocking { + val scope = this + with(HtmlRenderer(context)) { + scope.render(page) + } + } renderedContent.match(Div("a", Div(Div("bc")), "d")) } diff --git a/plugins/base/src/test/kotlin/renderers/html/PlatformDependentHintTest.kt b/plugins/base/src/test/kotlin/renderers/html/PlatformDependentHintTest.kt index cf1ac0a9..3e603955 100644 --- a/plugins/base/src/test/kotlin/renderers/html/PlatformDependentHintTest.kt +++ b/plugins/base/src/test/kotlin/renderers/html/PlatformDependentHintTest.kt @@ -1,5 +1,6 @@ package renderers.html +import kotlinx.coroutines.runBlocking import org.jetbrains.dokka.Platform import org.jetbrains.dokka.base.renderers.html.HtmlRenderer import org.jetbrains.dokka.pages.PlatformData @@ -99,7 +100,12 @@ class PlatformDependentHintTest : RenderingOnlyTestBase() { } } - HtmlRenderer(context).render(page) + runBlocking { + val scope = this + with(HtmlRenderer(context)) { + scope.render(page) + } + } println(renderedContent) renderedContent.match(Div(Div("ab"))) } |