I am adding tests using swift-testing to a parser library and would like to access files.

What is the recommended way to do that ? Is using the SwiftPM Resource.copy then Bundle.module.path(...) facility the way to go ?

Hi @mlienert, yes, when writing tests in a Swift package, I'd recommend that approach to access files as resources in the test target. Or you can use Bundle.module.url(forResource: ...), but the general idea is to ask for the location from Bundle.module.

Thank you for your feedback !