Skip to content

Commit

Permalink
adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
majk-p committed Sep 18, 2024
1 parent f5c4708 commit 50f0861
Showing 1 changed file with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ object FileSnapshotSpec extends SimpleIOSuite {
}

private def assert(found: String, path: PathChunk)(config: SnapshotConfig) = {
FileSnapshot(found, path.toString, "FileSnapshotSpec.scala", config, comparison, resultLike)
FileSnapshot(
found,
path.toString,
s"${config.sourceDirectory.value}/src/test/scala/FileSnapshotSpec.scala",
config,
comparison,
resultLike
)
}

private def writeSnapshot(snapshot: String, path: PathChunk)(config: SnapshotConfig) = {
Expand Down Expand Up @@ -94,7 +101,9 @@ object FileSnapshotSpec extends SimpleIOSuite {
patches <- getPatches(config)
} yield expect.same(
patches,
List(config.outputDirectory.osPath / "resource-patch" / "snapshot")
List(
config.outputDirectory.osPath / "resource-patch" / "src" / "test" / "scala" / "FileSnapshotSpec.scala" / "snapshot"
)
)
}

Expand All @@ -105,7 +114,9 @@ object FileSnapshotSpec extends SimpleIOSuite {
patches <- getPatches(config)
} yield expect.same(
patches,
List(config.outputDirectory.osPath / "resource-patch" / "nested" / "snapshot")
List(
config.outputDirectory.osPath / "resource-patch" / "src" / "test" / "scala" / "FileSnapshotSpec.scala" / "nested" / "snapshot"
)
)
}
}

0 comments on commit 50f0861

Please sign in to comment.