Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Sources/Mocker/Mocker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public struct Mocker {
/// The HTTP Version to use in the mocked response.
public static var httpVersion: HTTPVersion = HTTPVersion.http1_1

/// The registrated mocks.
/// The registered mocks.
private(set) var mocks: [Mock] = []

/// URLs to ignore for mocking.
Expand Down
4 changes: 2 additions & 2 deletions Sources/Mocker/URLMatchType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public enum URLMatchType {
}

extension URL {
/// Returns the base URL string build with the scheme, host and path. "https://www.wetransfer.com/v1/test?param=test" would be "https://www.wetransfer.com/v1/test".
/// Returns the base URL string built with the scheme, host and path. "https://www.wetransfer.com/v1/test?param=test" would be "https://www.wetransfer.com/v1/test".
var baseString: String? {
guard let scheme = scheme, let host = host else { return nil }
return scheme + "://" + host + path
Expand All @@ -27,7 +27,7 @@ extension URL {
/// Checks if this URL matches the passed URL using the provided match type.
///
/// - Parameter url: The URL to check for a match.
/// - Parameter matchType: The approach that will be used to determine whether this URL match the provided URL. Defaults to `full`.
/// - Parameter matchType: The approach that will be used to determine whether this URL matches the provided URL. Defaults to `full`.
/// - Returns: `true` if the URL matches based on the match type; `false` otherwise.
func matches(_ otherURL: URL?, matchType: URLMatchType = .full) -> Bool {
guard let otherURL else { return false }
Expand Down