Retrofit deferFulfillment onto snapshot tests. (#3641)

* Retrofit `deferFulfillment` onto snapshot tests.

* Convert a bunch of preview tests to the new fulfillment publisher

* Convert more tests

* Remove unneeded delays from the remaining tests

* Remove snapshotting delay option.
This commit is contained in:
Stefan Ceriu
2024-12-20 15:30:59 +02:00
committed by GitHub
parent 365797c8b7
commit 536f01abbd
49 changed files with 606 additions and 532 deletions
+2 -2
View File
@@ -26,9 +26,9 @@ extension PreviewTests {
// MARK: - PreviewProvider
{% for type in types.types where (type.implements.TestablePreview or type.based.TestablePreview or type|annotated:"TestablePreview") and type.name != "TestablePreview" %}
func test_{{ type.name|lowerFirstLetter|replace:"_Previews", "" }}() {
func test_{{ type.name|lowerFirstLetter|replace:"_Previews", "" }}() async throws {
for preview in {{ type.name }}._allPreviews {
assertSnapshots(matching: preview)
try await assertSnapshots(matching: preview)
}
}
{%- if not forloop.last %}