Skip to content

Commit

Permalink
Paywalls: disable animations during unit tests (#2848)
Browse files Browse the repository at this point in the history
This improves snapshot tests, and means we can reduce the polling time.
  • Loading branch information
NachoSoto committed Aug 31, 2023
1 parent 16a1b54 commit 74ddb63
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Tests/UnitTests/TestHelpers/SnapshotTesting+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ extension SwiftUI.View {
file: StaticString = #file,
line: UInt = #line
) {
UIView.setAnimationsEnabled(false)

// Add test view to the hierarchy to make sure async rendering takes place.
// The tested view is `controller.view` instead of `self` to keep it in memory
// while rendering happens
Expand Down

0 comments on commit 74ddb63

Please sign in to comment.