Documented the StaticFile enumeration in the library target.

This commit is contained in:
2025-03-05 00:04:07 +01:00
parent 299a196fff
commit 996459c9f0
3 changed files with 44 additions and 2 deletions
@@ -0,0 +1,36 @@
import Testing
@testable import AppLibrary
@Suite("StaticFile")
struct StaticFileTests {
@Test(arguments: zip(StaticFile.allCases, [String].paths))
func path(
for prefix: StaticFile,
expects pathExpected: String
) async throws {
// GIVEN
// WHEN
let path = prefix.path
// THEN
#expect(path == pathExpected)
}
}
// MARK: - Collection+Strings
private extension Collection where Element == String {
// MARK: Properties
static var paths: [Element] {[
"/data/documentation.json",
"/favicon.ico",
"/favicon.svg",
"/theme-settings.json"
]}
}