Skip to content

Commit aabc46b

Browse files
committed
WIP
1 parent c4a5fd2 commit aabc46b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Tests/Tests/TestUtils.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import SwiftUI
22
import XCTest
33

44
#if canImport(UIKit)
5+
@MainActor
56
enum TestUtils {
67
#if targetEnvironment(macCatalyst) || os(visionOS)
78
static let window = UIWindow(frame: CGRect(x: 0, y: 0, width: 480, height: 300))
@@ -24,6 +25,7 @@ enum TestUtils {
2425
}
2526
}
2627
#elseif canImport(AppKit)
28+
@MainActor
2729
enum TestUtils {
2830
private static let window = NSWindow(
2931
contentRect: NSRect(x: 0, y: 0, width: 480, height: 300),
@@ -40,6 +42,7 @@ enum TestUtils {
4042
}
4143
#endif
4244

45+
@MainActor
4346
func XCTAssertViewIntrospection<Entity: AnyObject>(
4447
of type: Entity.Type,
4548
@ViewBuilder view: (Spies<Entity>) -> some View,

0 commit comments

Comments
 (0)