Closed tadelv closed 1 year ago
Also, it does not matter whether LNPopupUI or LNPopupUI-Static is the dependency. Eitherway, module emitting fails because of LNPopupController_ObjC
Using your project, to get the tests to run I linked the test target with LNPopupUI
:
I’m not sure why this is required. It could be an Xcode bug with how @testable import
is implemented. I’m not really familiar with how that works in Swift. I don’t think there is any misconfiguration on this project’s part, so I am closing the issue.
Thanks
Just to confirm, this fixes the build. Thanks again!
Just an aside, I don’t think you should be unit-testing UI. I know with SwiftUI, this is a tall order, because of model-view intertwining (terrible), but normal XCTest
is really not suited for any UI testing, nor should it be. This is a small issue. But throughout your testing, you will hit many, many issues related to expecting stuff from the system UI frameworks or their state. Just an unsolicited word of caution. 🙂
Thanks for the after thought, I appreciate it. I'm not testing the UI in the actual app where I first observed the issue.
Describe the Bug I'm using LNPopupUI as a SPM dependency in my project, added through Xcode. I have my target set up so that it adds LNPopupUI-Static (not sure if this is the intended way). When I try to build tests for my target, I get a failure
<unknown>:0: error: missing required module 'LNPopupController_ObjC'
To Reproduce Steps to reproduce the behavior:
LNPopupUI
and attach popup to ContentView contentExpected Behavior Test bundle should build and run tests
Additional Context I've uploaded an example that reproduces the issue here