Skip to content

Commit

Permalink
Clean up @mainactor
Browse files Browse the repository at this point in the history
  • Loading branch information
materik committed Apr 2, 2024
1 parent e48f95a commit 2a79e9c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/SnapshotTestCase/Snapshot.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ private extension Snapshot.TestCase {
guard let context = UIGraphicsGetCurrentContext() else {
throw SnapshotError.invalidContext
}

try await Task.sleep(for: .seconds(renderDelay))
await MainActor.run {
view.layer.render(in: context)
Expand Down
1 change: 0 additions & 1 deletion Sources/SnapshotTestCase/SnapshotTestCase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ let snapshot = Snapshot()

public protocol SnapshotTestCase: AnyObject { }

@MainActor
public extension SnapshotTestCase where Self: XCTestCase {
func verifySnapshot(
name: String? = nil,
Expand Down

0 comments on commit 2a79e9c

Please sign in to comment.