diff options
author | Filip Zybała <fzybala@virtuslab.com> | 2020-05-13 09:03:49 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-05-14 11:20:53 +0200 |
commit | d6bfd213a2f363f0581bdc85a68e11c170c93071 (patch) | |
tree | 199e9270d6054821509dba5809aa7f9038e511f0 /plugins/base/src/test/kotlin | |
parent | abc0d2791a47635e4ce909041e7705de4121bb05 (diff) | |
download | dokka-d6bfd213a2f363f0581bdc85a68e11c170c93071.tar.gz dokka-d6bfd213a2f363f0581bdc85a68e11c170c93071.tar.bz2 dokka-d6bfd213a2f363f0581bdc85a68e11c170c93071.zip |
Disabled expect tests. Added .gitignore to ignore irrelevant files from expect tests. Adjusted Expected Tests to omit folders without html inside.
Diffstat (limited to 'plugins/base/src/test/kotlin')
-rw-r--r-- | plugins/base/src/test/kotlin/expect/ExpectTest.kt | 8 | ||||
-rw-r--r-- | plugins/base/src/test/kotlin/expect/ExpectUtils.kt | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/plugins/base/src/test/kotlin/expect/ExpectTest.kt b/plugins/base/src/test/kotlin/expect/ExpectTest.kt index e4123256..bed841a6 100644 --- a/plugins/base/src/test/kotlin/expect/ExpectTest.kt +++ b/plugins/base/src/test/kotlin/expect/ExpectTest.kt @@ -1,16 +1,22 @@ package expect +import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.DynamicTest.dynamicTest import org.junit.jupiter.api.TestFactory class ExpectTest : AbstractExpectTest() { private val ignores: List<String> = listOf( + "images", + "scripts", + "images", + "styles", "*.js", "*.css", "*.svg", "*.map" ) - + + @Disabled @TestFactory fun expectTest() = testDir?.dirsWithFormats(formats).orEmpty().map { (p, f) -> dynamicTest("${p.fileName}-$f") { testOutputWithExcludes(p, f, ignores) } diff --git a/plugins/base/src/test/kotlin/expect/ExpectUtils.kt b/plugins/base/src/test/kotlin/expect/ExpectUtils.kt index 4ea46dda..1f54c20e 100644 --- a/plugins/base/src/test/kotlin/expect/ExpectUtils.kt +++ b/plugins/base/src/test/kotlin/expect/ExpectUtils.kt @@ -8,7 +8,7 @@ import kotlin.streams.toList data class ProcessResult(val code: Int, val out: String, val err: String? = null) internal fun Path.dirsWithFormats(formats: List<String>): List<Pair<Path, String>> = - Files.list(this).toList().flatMap { p -> formats.map { p to it } } + Files.list(this).toList().filter { Files.isDirectory(it) }.flatMap { p -> formats.map { p to it } } internal fun Path.asString() = normalize().toString() internal fun Path.deleteRecursively() = toFile().deleteRecursively() |