diff options
author | Igor Yakovlev <igor.yakovlev@jetbrains.com> | 2023-01-25 19:03:21 +0100 |
---|---|---|
committer | igoriakovlev <54274820+igoriakovlev@users.noreply.github.com> | 2023-01-26 15:03:04 +0100 |
commit | 7a680acb011e38c66e2039cd5d831a49b16546ad (patch) | |
tree | 1e6c410868c474b58eeb996a67ef3f0a9fbbc237 /integration-tests/gradle/src/integrationTest/kotlin/org | |
parent | adfeed1b35b94ced80aba4e13dc926b2c389efb1 (diff) | |
download | dokka-7a680acb011e38c66e2039cd5d831a49b16546ad.tar.gz dokka-7a680acb011e38c66e2039cd5d831a49b16546ad.tar.bz2 dokka-7a680acb011e38c66e2039cd5d831a49b16546ad.zip |
Support kotlin wasm target
Diffstat (limited to 'integration-tests/gradle/src/integrationTest/kotlin/org')
-rw-r--r-- | integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmGradleIntegrationTest.kt | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmGradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmGradleIntegrationTest.kt new file mode 100644 index 00000000..f4774dff --- /dev/null +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmGradleIntegrationTest.kt @@ -0,0 +1,50 @@ +package org.jetbrains.dokka.it.gradle + +import org.gradle.testkit.runner.TaskOutcome +import org.junit.runners.Parameterized.Parameters +import java.io.File +import kotlin.test.* + +class WasmGradleIntegrationTest(override val versions: BuildVersions) : AbstractGradleIntegrationTest() { + + companion object { + @get:JvmStatic + @get:Parameters(name = "{0}") + val versions = listOf(TestedVersions.LATEST) + } + + @BeforeTest + fun prepareProjectFiles() { + val templateProjectDir = File("projects", "it-wasm-basic") + + templateProjectDir.listFiles().orEmpty() + .filter { it.isFile } + .filterNot { it.name == "local.properties" } + .filterNot { it.name.startsWith("gradlew") } + .forEach { topLevelFile -> topLevelFile.copyTo(File(projectDir, topLevelFile.name)) } + + File(templateProjectDir, "src").copyRecursively(File(projectDir, "src")) + } + + @Test + fun execute() { + val result = createGradleRunner("dokkaHtml", "-i", "-s").buildRelaxed() + assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":dokkaHtml")).outcome) + + val htmlOutputDir = File(projectDir, "build/dokka/html") + assertTrue(htmlOutputDir.isDirectory, "Missing html output directory") + + assertTrue( + htmlOutputDir.allHtmlFiles().count() > 0, + "Expected html files in html output directory" + ) + + htmlOutputDir.allHtmlFiles().forEach { file -> + assertContainsNoErrorClass(file) + assertNoHrefToMissingLocalFileOrDirectory(file) + assertNoUnresolvedLinks(file) + assertNoEmptyLinks(file) + assertNoEmptySpans(file) + } + } +} |