We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3713062 commit 83f6e2cCopy full SHA for 83f6e2c
Tests/DynamicJSONTests/JSONPatchLargeTest.swift
@@ -13,12 +13,13 @@ final class JSONPatchLargeTest: XCTestCase {
13
14
private func jsonFileURL(_ filename: String) throws -> URL? {
15
let bundle = Bundle(for: type(of: self))
16
- guard let url = bundle.url(forResource: filename,
17
- withExtension: "json",
18
- subdirectory: "JSONPatch") else {
19
- return nil
+ if let url = bundle.url(forResource: filename,
+ withExtension: "json",
+ subdirectory: "JSONPatch") {
+ return url
20
}
21
- return url
+ let url = URL(fileURLWithPath: "Tests/DynamicJSONTests/ComplianceTests/JSONPatch/\(filename).json")
22
+ return FileManager.default.fileExists(atPath: url.path) ? url : nil
23
24
25
private func loadJSON(_ filename: String) throws -> JSON? {
0 commit comments