nerdishbynature / octokit.swift

A Swift API Client for GitHub and GitHub Enterprise
MIT License
488 stars 126 forks source link

Fix `swift test` invocations on macOS #107

Closed MaxDesiatov closed 4 years ago

MaxDesiatov commented 4 years ago

Currently, when opening Package.swift instead of the project file in Xcode, or when running swift test from command-line on macOS, the tests fail. This is caused by the lack of support for test bundle resources in SwiftPM. This can be easily fixed by inferring the test file path from the #file value. Additionally, this behaviour is cross-platform and doesn't require special handling on Linux.