Skip to content

Commit

Permalink
fix(RequiresTagInterceptor): Add fix to handle scenario where no tags…
Browse files Browse the repository at this point in the history
… are present in the runtime tags, but some specs are annotated with @RequiresTag()

Ref kotest#3531
  • Loading branch information
zakhenry authored and Kantis committed May 18, 2023
1 parent bd93dae commit 141aebe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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") }
Expand Down

0 comments on commit 141aebe

Please sign in to comment.