Skip to content

Commit 567c66a

Browse files
authored
Include watchOS 4.0 in @available check (#579)
1 parent ad2c831 commit 567c66a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Sources/SnapshotTesting/Snapshotting/Any.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ extension Snapshotting where Format == String {
77
}
88
}
99

10-
@available(macOS 10.13, *)
10+
@available(macOS 10.13, watchOS 4.0, *)
1111
extension Snapshotting where Format == String {
1212
/// A snapshot strategy for comparing any structure based on their JSON representation.
1313
public static var json: Snapshotting {

Sources/SnapshotTesting/Snapshotting/Codable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Foundation
22

33
extension Snapshotting where Value: Encodable, Format == String {
44
/// A snapshot strategy for comparing encodable structures based on their JSON representation.
5-
@available(iOS 11.0, macOS 10.13, tvOS 11.0, *)
5+
@available(iOS 11.0, macOS 10.13, tvOS 11.0, watchOS 4.0, *)
66
public static var json: Snapshotting {
77
let encoder = JSONEncoder()
88
encoder.outputFormatting = [.prettyPrinted, .sortedKeys]

Sources/SnapshotTesting/Snapshotting/URLRequest.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ extension Snapshotting where Value == URLRequest, Format == String {
2020

2121
let body: [String]
2222
do {
23-
if pretty, #available(iOS 11.0, macOS 10.13, tvOS 11.0, *) {
23+
if pretty, #available(iOS 11.0, macOS 10.13, tvOS 11.0, watchOS 4.0, *) {
2424
body = try request.httpBody
2525
.map { try JSONSerialization.jsonObject(with: $0, options: []) }
2626
.map { try JSONSerialization.data(withJSONObject: $0, options: [.prettyPrinted, .sortedKeys]) }

0 commit comments

Comments
 (0)