Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
davdroman committed Jul 16, 2024
1 parent c4a5fd2 commit aabc46b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Tests/Tests/TestUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import SwiftUI
import XCTest

#if canImport(UIKit)
@MainActor
enum TestUtils {
#if targetEnvironment(macCatalyst) || os(visionOS)
static let window = UIWindow(frame: CGRect(x: 0, y: 0, width: 480, height: 300))
Expand All @@ -24,6 +25,7 @@ enum TestUtils {
}
}
#elseif canImport(AppKit)
@MainActor
enum TestUtils {
private static let window = NSWindow(
contentRect: NSRect(x: 0, y: 0, width: 480, height: 300),
Expand All @@ -40,6 +42,7 @@ enum TestUtils {
}
#endif

@MainActor
func XCTAssertViewIntrospection<Entity: AnyObject>(
of type: Entity.Type,
@ViewBuilder view: (Spies<Entity>) -> some View,
Expand Down

0 comments on commit aabc46b

Please sign in to comment.