diff --git a/kotest-framework/kotest-framework-engine/src/commonMain/kotlin/io/kotest/engine/spec/interceptor/ref/RequiresTagInterceptor.kt b/kotest-framework/kotest-framework-engine/src/commonMain/kotlin/io/kotest/engine/spec/interceptor/ref/RequiresTagInterceptor.kt index 460f7a81e17..ebf21f6c90c 100644 --- a/kotest-framework/kotest-framework-engine/src/commonMain/kotlin/io/kotest/engine/spec/interceptor/ref/RequiresTagInterceptor.kt +++ b/kotest-framework/kotest-framework-engine/src/commonMain/kotlin/io/kotest/engine/spec/interceptor/ref/RequiresTagInterceptor.kt @@ -36,7 +36,7 @@ internal class RequiresTagInterceptor( else -> { val requiredTags = annotation.wrapper.map { NamedTag(it) }.toSet() val expr = configuration.runtimeTagExpression().parse() - if (requiredTags.isEmpty() || expr.isActive(requiredTags)) { + if (requiredTags.isEmpty() || (expr != null && expr.isActive(requiredTags))) { fn(ref) } else { runCatching { listener.specIgnored(ref.kclass, "Disabled by @RequiresTag") }