diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2023-08-30 15:58:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-30 15:58:46 +0200 |
commit | c63ea36637ce956029fb15b1482c0683ecb8a587 (patch) | |
tree | 2b75a8a976b43530820e73dc60cce4b10d9fc005 /plugins/mathjax/src/test | |
parent | 0e00edc6fcd406fcf38673ef6a2f8f59e8374de2 (diff) | |
download | dokka-c63ea36637ce956029fb15b1482c0683ecb8a587.tar.gz dokka-c63ea36637ce956029fb15b1482c0683ecb8a587.tar.bz2 dokka-c63ea36637ce956029fb15b1482c0683ecb8a587.zip |
Migrate to JUnit 5 and unify used test API (#3138)
Diffstat (limited to 'plugins/mathjax/src/test')
-rw-r--r-- | plugins/mathjax/src/test/kotlin/MathjaxPluginTest.kt | 9 |
1 files changed, 5 insertions, 4 deletions
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) }) } |