// Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/ import { textToHtml } from '../helpers' describe('textToHtml', () => { it('adds links to URL-like text', () => { const input = 'Some Text\n\nhttp://example.com' const output = '
Some Text

http://example.com
' expect(textToHtml(input)).toBe(output) }) it('escapes HTML-like text to make sure it is presented as-is', () => { const input = '

&It;div>hello world</div>

' const output = '
<p>&It;div&gt;hello world&lt;/div&gt;</p>
' expect(textToHtml(input)).toBe(output) }) })