Spaces:
Paused
Paused
OpenClawBot / apps /shared /OpenClawKit /Tests /OpenClawKitTests /ChatMarkdownPreprocessorTests.swift
| import Testing | |
| @testable import OpenClawChatUI | |
| ("ChatMarkdownPreprocessor") | |
| struct ChatMarkdownPreprocessorTests { | |
| func extractsDataURLImages() { | |
| let base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIHWP4////GQAJ+wP/2hN8NwAAAABJRU5ErkJggg==" | |
| let markdown = """ | |
| Hello | |
| ) | |
| """ | |
| let result = ChatMarkdownPreprocessor.preprocess(markdown: markdown) | |
| #expect(result.cleaned == "Hello") | |
| #expect(result.images.count == 1) | |
| #expect(result.images.first?.image != nil) | |
| } | |
| } | |