From 01ce5ee73feb8bda35749a186c0efcd3d6d7a060 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Wed, 18 Mar 2026 19:52:01 -0500 Subject: use native markdown rendering for settings bio --- HutchTests/SettingsViewTests.swift | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 HutchTests/SettingsViewTests.swift (limited to 'HutchTests/SettingsViewTests.swift') diff --git a/HutchTests/SettingsViewTests.swift b/HutchTests/SettingsViewTests.swift new file mode 100644 index 0000000..950c3dc --- /dev/null +++ b/HutchTests/SettingsViewTests.swift @@ -0,0 +1,22 @@ +import Foundation +import Testing +@testable import Hutch + +struct SettingsViewTests { + + @Test + @MainActor + func settingsBioAttributedStringPreservesInlineMarkdown() { + let attributed = settingsBioAttributedString("Hello **world** and [link](https://example.com)") + + #expect(String(attributed.characters).contains("Hello world and link")) + } + + @Test + @MainActor + func settingsBioAttributedStringFallsBackForInvalidMarkdown() { + let attributed = settingsBioAttributedString("[broken") + + #expect(String(attributed.characters) == "[broken") + } +} -- cgit v1.2.3