We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isRecording
1 parent fa43e37 commit 172f441Copy full SHA for 172f441
Sources/SnapshotTesting/AssertSnapshot.swift
@@ -9,7 +9,16 @@ import XCTest
9
public var diffTool: String? = nil
10
11
/// Whether or not to record all new references.
12
-public var isRecording = false
+public var isRecording: Bool = {
13
+ let args = ProcessInfo.processInfo.arguments
14
+ if let index = args.firstIndex(of: "-co.pointfree.SnapshotTesting.IsRecording"),
15
+ index < args.count - 1,
16
+ args[index + 1] == "1"
17
+ {
18
+ return true
19
+ }
20
+ return false
21
+}()
22
23
24
///
0 commit comments