Files
clawdbot/apps/shared/ClawdisKit/Tests/ClawdisKitTests/CanvasSnapshotFormatTests.swift
2025-12-18 23:31:34 +01:00

17 lines
431 B
Swift

import ClawdisKit
import Foundation
import Testing
@Suite struct CanvasSnapshotFormatTests {
@Test func acceptsJpgAlias() throws {
struct Wrapper: Codable {
var format: ClawdisCanvasSnapshotFormat
}
let data = try #require("{\"format\":\"jpg\"}".data(using: .utf8))
let decoded = try JSONDecoder().decode(Wrapper.self, from: data)
#expect(decoded.format == .jpeg)
}
}