Skip to content

Commit

Permalink
Correct Swift key path usage to ensure compatibility with tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
BAHATTIN KOC committed Aug 31, 2024
1 parent ff19d64 commit dc79d14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/SnapshotTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ final class SnapshotTests: XCTestCase {
animationName = animationName.replacingOccurrences(of: "-", with: "/")

XCTAssert(
Samples.sampleAnimationURLs.contains(where: \.absoluteString.hasSuffix("\(animationName).json"))
|| Samples.sampleAnimationURLs.contains(where: \.absoluteString.hasSuffix("\(animationName).lottie")),
Samples.sampleAnimationURLs.contains(where: { $0.absoluteString.hasSuffix("\(animationName).json") })
|| Samples.sampleAnimationURLs.contains(where: { $0.absoluteString.hasSuffix("\(animationName).lottie") }),
"Snapshot \"\(snapshotURL.lastPathComponent)\" has no corresponding sample animation. Expecting \(animationName).json|.lottie")
}
}
Expand Down

0 comments on commit dc79d14

Please sign in to comment.