mlienert
(Martial Lienert)
1
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 ?
smontgomery
(Stuart Montgomery)
2
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.
mlienert
(Martial Lienert)
3
Thank you for your feedback !