I'm getting an error running unit tests with swift test that succeed when I run them from Xcode. The units and my CoreData model are in a Swift Package. I'm loading the model using Bundle.module like so:
Bundle.module.url(forResource: PersistenceController.modelName, withExtension: "momd")
The unit tests are able to load the CoreData model when run from Xcode and also using the xcodebuild test command line.
When I run the tests with swift test I get the following error:
error: cannot find type 'MyEntity' in scope
Is there something more to be done to enable running CoreData unit tests from a Package using swift tests?