Live Activities, nudging, unit tests

This commit is contained in:
2026-04-20 11:11:24 +02:00
parent 3858500a45
commit 7e25a4f978
15 changed files with 348 additions and 20 deletions
@@ -148,9 +148,9 @@ struct AnyCodableTests {
@Test("Dictionary decodes keys correctly")
func dictRoundTrip() throws {
let dict = AnyCodable(["key": AnyCodable("value")])
let encoded = try JSONEncoder().encode(dict)
let decoded = try JSONDecoder().decode(AnyCodable.self, from: encoded)
// Build the AnyCodable from raw JSON to avoid double-wrapping issues
let json = #"{"key":"value"}"#
let decoded = try JSONDecoder().decode(AnyCodable.self, from: Data(json.utf8))
let map = try decoded.decode(as: [String: AnyCodable].self)
#expect(try map["key"]?.decode(as: String.self) == "value")
}