To test SwiftUI applications, don't test SwiftUI code. The SwiftUI framework doesn't lend itself to writing unit tests so don't try to shoehorn views in your test harness. Instead, split layout declaration form content generation logic.
This free tutorial shows how to migrate an existing app with SwiftUI life cycle to use UIKit App Delegate instead
How to make the unit tests of your SwiftUI app safer and faster by preventing them from running the program startup flow. This will avoid all of the launch operations like network requests or reads from the local storage that would affect the global state.
Using Swift's nested types helps making it clear that a view model belongs to a view.