Skip to content

Commit

Permalink
Don't fail when snapshot is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
keynmol committed Feb 10, 2024
1 parent c068c7c commit d0e576f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
@@ -1 +1 @@
hello?
hello - more stuff
2 changes: 1 addition & 1 deletion modules/example/src/test/scala/ExampleTests.scala
Expand Up @@ -9,6 +9,6 @@ import example.Snapshots

class ExampleTests extends FunSuite with SnapshotsIntegration {
test("hello") {
assertSnapshot("my.snapshot", "hello?")
assertSnapshot("my.snapshot", "hello - more stuff")
}
}
4 changes: 0 additions & 4 deletions modules/example/src/test/scala/SnapshotsIntegration.scala
Expand Up @@ -17,10 +17,6 @@ trait SnapshotsIntegration {
Diffs.create(contents, "").createDiffOnlyReport()
)

Assertions.fail(
s"No snapshot was found for $name, please run checkSnapshots command and accept a snapshot for this test"
)

case Some(value) =>
val diff = Diffs.create(contents, value)
if (!diff.isEmpty) {
Expand Down

0 comments on commit d0e576f

Please sign in to comment.