Skip to content

Commit a29a9cc

Browse files
authored
Fix flaky test case (#575)
1 parent 013d12e commit a29a9cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Tests/OpenSwiftUITests/Data/Environment/UIKitEnvironmentTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
import Testing
88
import UIKit
99

10+
@MainActor
1011
struct UIKitEnvironmentTests {
1112
@Test
1213
func overrideTrait() {
13-
let trait = UITraitCollection.current
14+
let trait = UITraitCollection()
1415
#expect(trait.layoutDirection == .unspecified)
1516
var environment = EnvironmentValues()
1617
environment.layoutDirection = .rightToLeft

0 commit comments

Comments
 (0)