Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions native/swift/Tests/wordpress-api/HTTPErrorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import Foundation
import XCTest

@testable import WordPressAPI

#if canImport(WordPressAPIInternal)
import WordPressAPIInternal
#endif

class HTTPErrorTests: XCTestCase {

Expand All @@ -25,7 +28,11 @@ class HTTPErrorTests: XCTestCase {
} catch let error as URLError {
XCTAssertEqual(error.code, .timedOut)
} catch {
#if canImport(WordPressAPIInternal)
XCTAssertTrue(error is WordPressAPIInternal.WpApiError)
#else
XCTAssertTrue(error is WpApiError)
#endif
}
}
#endif
Expand Down