Skip to content

Commit

Permalink
Reuse UIWindow(wrapping) in KeyboardTests
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillyakimovich committed Jun 4, 2024
1 parent 3b780f3 commit 4b55fce
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Tests/HammerTests/KeyboardTests.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Hammer
@testable import Hammer
import UIKit
import XCTest

Expand Down Expand Up @@ -187,8 +187,7 @@ final class KeyboardTests: XCTestCase {
view.centerXAnchor.constraint(equalTo: viewController.view.centerXAnchor),
])

let window = UIWindow(frame: UIScreen.main.bounds)
window.rootViewController = viewController
let window = UIWindow(wrapping: viewController)
window.isHidden = false

let eventGenerator = try EventGenerator(window: window)
Expand Down

0 comments on commit 4b55fce

Please sign in to comment.