Swift package resources not copied in unit tests

I have a library written almost entirely in Objective-C, the library have unit tests target.

when I try to run swift test the tests fail because the target resources bundle SWIFTPM_MODULE_BUNDLE is nil, how can I copy the resources bundle when being used in a unit test target?.

Everything work as expected when using the Swift package target in a regular Xcode project.


See discussion and example at Finding Swift Package Manager Resources