From c63ea36637ce956029fb15b1482c0683ecb8a587 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Wed, 30 Aug 2023 15:58:46 +0200 Subject: Migrate to JUnit 5 and unify used test API (#3138) --- plugins/mathjax/src/test/kotlin/MathjaxPluginTest.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'plugins/mathjax/src/test') diff --git a/plugins/mathjax/src/test/kotlin/MathjaxPluginTest.kt b/plugins/mathjax/src/test/kotlin/MathjaxPluginTest.kt index c603e588..9309d30f 100644 --- a/plugins/mathjax/src/test/kotlin/MathjaxPluginTest.kt +++ b/plugins/mathjax/src/test/kotlin/MathjaxPluginTest.kt @@ -4,8 +4,9 @@ import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest import org.jetbrains.dokka.mathjax.LIB_PATH import org.jetbrains.dokka.mathjax.MathjaxPlugin import org.jsoup.Jsoup -import org.junit.jupiter.api.Test import utils.TestOutputWriterPlugin +import kotlin.test.Test +import kotlin.test.assertTrue class MathjaxPluginTest : BaseAbstractTest() { @Test @@ -38,7 +39,7 @@ class MathjaxPluginTest : BaseAbstractTest() { .head() .select("link, script") .let { - assert(!it.`is`("[href=$LIB_PATH], [src=$LIB_PATH]")) + assertTrue(!it.`is`("[href=$LIB_PATH], [src=$LIB_PATH]")) } } } @@ -75,10 +76,10 @@ class MathjaxPluginTest : BaseAbstractTest() { val parsed = Jsoup.parse(writerPlugin.writer.contents.getValue("root/example/test.html")) // Ensure the MathJax CDN is loaded - assert(parsed.select("link, script").`is`("[href=$LIB_PATH], [src=$LIB_PATH]")) + assertTrue(parsed.select("link, script").`is`("[href=$LIB_PATH], [src=$LIB_PATH]")) // Ensure the contents are displayed - assert(parsed.select("p").any { + assertTrue(parsed.select("p").any { it.text().contains(math) }) } -- cgit