Added the WebP case to the Asset extensions in the Infrastructure package.
This commit is contained in:
@@ -32,6 +32,17 @@ struct AssetExtensionTests {
|
||||
#expect(fileExtension.folder == folder)
|
||||
}
|
||||
|
||||
// MARK: CaseIterable tests
|
||||
|
||||
@Test
|
||||
func `covers every case in the parameterised tests`() {
|
||||
// `zip` stops at the shorter sequence, so a case missing from the arrays below is silently untested rather
|
||||
// than failing — this is what catches that.
|
||||
#expect(Self.extensions == AssetExtension.allCases)
|
||||
#expect(Self.contentTypes.count == AssetExtension.allCases.count)
|
||||
#expect(Self.folders.count == AssetExtension.allCases.count)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Helpers
|
||||
@@ -44,6 +55,8 @@ private extension AssetExtensionTests {
|
||||
.css,
|
||||
.js,
|
||||
.png,
|
||||
.jpg,
|
||||
.webp,
|
||||
.ico,
|
||||
.svg,
|
||||
.txt,
|
||||
@@ -54,6 +67,8 @@ private extension AssetExtensionTests {
|
||||
"text/css",
|
||||
"text/javascript",
|
||||
"image/png",
|
||||
"image/jpeg",
|
||||
"image/webp",
|
||||
"image/vnd.microsoft.icon",
|
||||
"image/svg+xml",
|
||||
"text/plain",
|
||||
@@ -64,6 +79,8 @@ private extension AssetExtensionTests {
|
||||
"css",
|
||||
"js",
|
||||
nil,
|
||||
"media",
|
||||
"media",
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
|
||||
Reference in New Issue
Block a user