Skip to content

Commit

Permalink
FIR IDE: introduce param for enabling disabled tests
Browse files Browse the repository at this point in the history
  • Loading branch information
darthorimar committed Dec 7, 2020
1 parent a671054 commit d633033
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -11,6 +11,7 @@ import java.nio.file.Path

object IgnoreTests {
private const val INSERT_DIRECTIVE_AUTOMATICALLY = false // TODO use environment variable instead
private const val ALWAYS_CONSIDER_TEST_AS_PASSING = false // TODO use environment variable instead

fun runTestIfEnabledByFileDirective(
testFile: Path,
Expand Down Expand Up @@ -46,6 +47,11 @@ object IgnoreTests {
additionalFilesExtensions: List<String>,
test: () -> Unit
) {
if (ALWAYS_CONSIDER_TEST_AS_PASSING) {
test()
return
}

val testIsEnabled = directive.isEnabledInFile(testFile)

try {
Expand Down

0 comments on commit d633033

Please sign in to comment.