@@ -151,16 +151,12 @@ in an XCTest context or a Swift Testing context, and will determine if it should
151151` Issue.record` to trigger a test failure.
152152
153153For the most part you can write tests for Swift Testing exactly as you would for XCTest. However,
154- there is one major difference. Swift Testing does not (yet) have a substitute for ` invokeTest` ,
155- which we used alongside ` withSnapshotTesting` to customize snapshotting for a full test class.
156-
157- There is an experimental version of this tool in Swift Testing, called ` CustomExecutionTrait` , and
158- this library provides such a trait called ` ` Testing/Trait/snapshots(diffTool:record:)` ` . It allows
159- you to customize snapshots for a ` @Test` or ` @Suite` , but to get access to it you must perform an
160- ` @_spi(Experimental)` import of snapshot testing:
154+ there is one major difference. In order to override a snapshot' s
155+ [configuration](<doc:SnapshotTestingConfiguration>) for a particular test or an entire suite you
156+ must use what are known as "test traits":
161157
162158```swift
163- @_spi(Experimental) import SnapshotTesting
159+ import SnapshotTesting
164160
165161@Suite(.snapshots(record: .all, diffTool: .ksdiff))
166162struct FeatureTests {
@@ -169,7 +165,4 @@ struct FeatureTests {
169165```
170166
171167That will override the `diffTool` and `record` options for the entire `FeatureTests` suite.
172-
173- > Important: As evident by the usage of ` @_spi(Experimental)` this API is subject to change. As
174- soon as the Swift Testing library finalizes its API for ` CustomExecutionTrait` we will update
175- the library accordingly and remove the ` @_spi` annotation.
168+ These traits can also be used on individual `@Test`s too.
0 commit comments