-
Notifications
You must be signed in to change notification settings - Fork 627
Sort URL query items #491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort URL query items #491
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for taking the time to do this!
I just have a few changes that I will take in before merging.
@mihai8804858 Looks like the curl tests are failing because they weren't similarly sorted. I suggest either adding sorting to that snapshot strategy, or removing the curl tests. |
@mbrandonw Added back query sorting for |
* Sort URL query items * Update Sources/SnapshotTesting/Snapshotting/URLRequest.swift * Update Sources/SnapshotTesting/Snapshotting/URLRequest.swift * Update Sources/SnapshotTesting/Snapshotting/URLRequest.swift * Update Sources/SnapshotTesting/Snapshotting/URLRequest.swift * Sort query items for curl Co-authored-by: Brandon Williams <[email protected]>
* Sort URL query items * Update Sources/SnapshotTesting/Snapshotting/URLRequest.swift * Update Sources/SnapshotTesting/Snapshotting/URLRequest.swift * Update Sources/SnapshotTesting/Snapshotting/URLRequest.swift * Update Sources/SnapshotTesting/Snapshotting/URLRequest.swift * Sort query items for curl Co-authored-by: Brandon Williams <[email protected]>
I have an issue with snapshotting an
URLRequest
that contains multiple query items. When I'm building theURLRequest
I'm using a[String: Any]
dictionary for queries which results in random order of query items in the finalURLRequest
.