We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let's check how we can add unit tests for SwiftUI Views.
We can try snapshotting with the existing snapshot library, like:
func testMyViewSnapshot() { // Create the SwiftUI view let view = MyView() let hostingController = UIHostingController(rootView: view) hostingController.view.frame = CGRect(x: 0, y: 0, width: 200, height: 100) assertSnapshot(matching: hostingController, as: .image) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Let's check how we can add unit tests for SwiftUI Views.
We can try snapshotting with the existing snapshot library, like:
The text was updated successfully, but these errors were encountered: