diff options
| author | Christian Cleberg <[email protected]> | 2026-03-18 19:52:01 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-03-18 19:52:01 -0500 |
| commit | 01ce5ee73feb8bda35749a186c0efcd3d6d7a060 (patch) | |
| tree | 983397238e0024dce1dba9c583e20639d6dbd779 /HutchTests/SettingsViewTests.swift | |
| parent | 59bf57bc90c5c9c009443ee4444c5e5253047dbe (diff) | |
| download | hutch-01ce5ee73feb8bda35749a186c0efcd3d6d7a060.tar.gz hutch-01ce5ee73feb8bda35749a186c0efcd3d6d7a060.tar.bz2 hutch-01ce5ee73feb8bda35749a186c0efcd3d6d7a060.zip | |
use native markdown rendering for settings bio
Diffstat (limited to 'HutchTests/SettingsViewTests.swift')
| -rw-r--r-- | HutchTests/SettingsViewTests.swift | 22 |
1 files changed, 22 insertions, 0 deletions
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") + } +} |
