Skip to content

Commit

Permalink
Merge pull request #55 from olafurpg/duplicate-ij
Browse files Browse the repository at this point in the history
Fix bug where test cases got reported as duplicates in IntelliJ.
  • Loading branch information
olafurpg authored Feb 16, 2020
2 parents 977de88 + d7d660d commit 38cf0b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion munit/shared/src/main/scala/munit/MUnitRunner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ class MUnitRunner(val cls: Class[_ <: Suite], newInstance: () => Suite)
)
}

override def getDescription(): Description = {
// NOTE(olafur): this method is a lazy val to avoid repeated computations.
// This method may get multiple times by clients such as IntelliJ, see
// https://github.com/scalameta/munit/issues/47
override lazy val getDescription: Description = {
try {
val suiteTests = StackTraces.dropOutside(munitTests)
suiteTests.foreach { test =>
Expand Down

0 comments on commit 38cf0b0

Please # to comment.