Replies: 2 comments 1 reply
-
I'm also in need of that, can you review this @mbrandonw or @stephencelis? I see linked PR has merge conflicts, I can fix that if you're willing to merge it. I'm currently running a fork because of that https://github.com/grdsdev/swift-snapshot-testing |
Beta Was this translation helpful? Give feedback.
-
Hi @grdsdev, we do not plan on merging that PR at this time. However, instead of depending on a fork, why don't you simply extract that snapshot strategy out of the library and make any changes you want to it? The strategy does not use any internals of the library, and so you should be able to maintain it yourself without involving a fork. |
Beta Was this translation helpful? Give feedback.
-
Snapshotting an URLRequest instance after it has been processed by the
URL Loading System
(by subclassingURLProtocol
) doesn't work properly at the moment, since the framework has support forhttpBody
but not forhttpBodyStream
.While processing the request, the
URL Loading System
places the data that was in thehttpBody
into thehttpBodyStream
before sending it to any subclass ofURLProtocol
to be fulfilled. That's why, if you're using a spy subclass to catch requests in tests, snapshotting won't reveal the data inside the request as of now.Beta Was this translation helpful? Give feedback.
All reactions