1

It appears the "@testable import" isn't importing all the files in the original project. An outside framework's files were added to the original project as individual files and none of them seem to be accessible for the test cases unless the "target membership" is checked for unit tests. It's strange because other functions in the unit tests that use these framework's files can be tested but the framework's files themselves can't be tested directly. I thought it might be related to this:

no-such-module-when-using-testable-in-xcode-unit-tests

but I tried the solutions to that answer (enable testability, etc. ) but I still can't access the files to test unless I check the target membership box explicitly. Any idea on how to get the @testable import to include these files?

SwiftyJD
  • 5,257
  • 7
  • 41
  • 92

2 Answers2

0

Found out what the issue was, there were type aliases for the functions to be called in framework, once I called those type aliases instead of the framework.functionName it worked fine.

SwiftyJD
  • 5,257
  • 7
  • 41
  • 92
0

If you're using cocoapods make sure to add your the pods needed for tests to your Test target in your podfile.

target "AppTests" do
  pod 'Pod', '~> 1.0'
end
Stritt
  • 527
  • 7
  • 7