I think the problem you're having is because your package tests are in a different bundle. Packages define a separate test target in the Package.swift manifest.
To allow your tests to access resources, like the momd file, you'll need to declare a public symbol for them. This is similar to what you would need to do to access those resources from your app target.
For example, in a source file in your Swift package:
public static let momURL = Bundle.module.url(forResource: "MyModel", withExtension: "momd")
You can then use this to load the MOM in your unit tests:
let mom = NSManagedObjectModel(contentsOf: momURL!)
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: