File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,15 @@ public func verifySnapshot<Value, Format>(
235235
236236 guard !recording, fileManager. fileExists ( atPath: snapshotFileUrl. path) else {
237237 try snapshotting. diffing. toData ( diffable) . write ( to: snapshotFileUrl)
238+ #if !os(Linux) && !os(Windows)
239+ if ProcessInfo . processInfo. environment. keys. contains ( " __XCODE_BUILT_PRODUCTS_DIR_PATHS " ) {
240+ XCTContext . runActivity ( named: " Attached Recorded Snapshot " ) { activity in
241+ let attachment = XCTAttachment ( contentsOfFile: snapshotFileUrl)
242+ activity. add ( attachment)
243+ }
244+ }
245+ #endif
246+
238247 return recording
239248 ? """
240249 Record mode is on. Turn record mode off and re-run " \( testName) " to test against the newly-recorded snapshot.
You can’t perform that action at this time.
0 commit comments