I am not sure I understand what you mean.
I managed to have a sample project at this repo https://github.com/codedbypm/Foo which has my same error.
If you check it out and run the tests you will see the error in the unit test file missing package Sentry.
I am sure this can help: commenting import Sentry out from FooApp.swift makes the unit tests build green.