diff options
Diffstat (limited to 'plugins/mathjax')
-rw-r--r-- | plugins/mathjax/build.gradle.kts | 4 | ||||
-rw-r--r-- | plugins/mathjax/src/test/kotlin/MathjaxPluginTest.kt | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/plugins/mathjax/build.gradle.kts b/plugins/mathjax/build.gradle.kts index 1d10d838..f84dad2e 100644 --- a/plugins/mathjax/build.gradle.kts +++ b/plugins/mathjax/build.gradle.kts @@ -13,12 +13,10 @@ dependencies { implementation(kotlin("reflect")) + testImplementation(kotlin("test")) testImplementation(libs.jsoup) testImplementation(projects.core.contentMatcherTestUtils) - testImplementation(kotlin("test-junit")) testImplementation(projects.core.testApi) - testImplementation(platform(libs.junit.bom)) - testImplementation(libs.junit.jupiter) symbolsTestConfiguration(project(path = ":subprojects:analysis-kotlin-symbols", configuration = "shadow")) descriptorsTestConfiguration(project(path = ":subprojects:analysis-kotlin-descriptors", configuration = "shadow")) 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) }) } |