Skip to content

Commit

Permalink
more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrandonw committed Jul 4, 2024
1 parent 54945d9 commit f18aa61
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Sources/SnapshotTesting/SnapshotsTestTrait.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

@_spi(Experimental)
extension Trait where Self == _SnapshotsTestTrait {
/// Configure snapshot testing in a suite or test.
/// - Parameters:
/// - diffTool: The diff tool to use in failure messages.
/// - record: The record mode of the test.
public static func snapshots(
diffTool: SnapshotTestingConfiguration.DiffTool = .default,
record: SnapshotTestingConfiguration.Record = .missing
Expand All @@ -14,14 +18,17 @@
)
)
}


/// Configure snapshot testing in a suite or test.
/// - Parameter configuration: The configuration to use.
public static func snapshots(
_ configuration: SnapshotTestingConfiguration
) -> Self {
_SnapshotsTestTrait(configuration: configuration)
}
}

/// A type representing the configuration of snapshot testing.
@_spi(Experimental)
public struct _SnapshotsTestTrait: CustomExecutionTrait, SuiteTrait, TestTrait {
public let isRecursive = true
Expand Down

0 comments on commit f18aa61

Please sign in to comment.