diff options
Diffstat (limited to 'plugins/base/src/test/kotlin/renderers/html/TextStylesTest.kt')
-rw-r--r-- | plugins/base/src/test/kotlin/renderers/html/TextStylesTest.kt | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/plugins/base/src/test/kotlin/renderers/html/TextStylesTest.kt b/plugins/base/src/test/kotlin/renderers/html/TextStylesTest.kt index 3c38e68c..d65a4f6e 100644 --- a/plugins/base/src/test/kotlin/renderers/html/TextStylesTest.kt +++ b/plugins/base/src/test/kotlin/renderers/html/TextStylesTest.kt @@ -2,14 +2,13 @@ package renderers.html import org.jetbrains.dokka.base.renderers.html.HtmlRenderer import org.jetbrains.dokka.pages.TextStyle +import org.jetbrains.dokka.pages.TokenStyle import org.jsoup.Jsoup import org.jsoup.nodes.Element import org.junit.jupiter.api.Test import renderers.testPage -import utils.B -import utils.I -import utils.STRIKE -import utils.match +import utils.* +import kotlin.test.assertEquals class TextStylesTest : HtmlRenderingOnlyTestBase() { @Test @@ -40,6 +39,16 @@ class TextStylesTest : HtmlRenderingOnlyTestBase() { } @Test + fun `should include token styles`(){ + val page = testPage { + text("keyword", styles = setOf(TokenStyle.Keyword)) + } + HtmlRenderer(context).render(page) + renderedContent.match(Span("keyword")) + assertEquals(renderedContent.children().last().attr("class"), "token keyword") + } + + @Test fun `should include multiple styles at one`(){ val page = testPage { text( |