import { escapeToBuffer } from './html' import type { StringBuffer } from './html' describe('HTML utilities', () => { describe('escapeToBuffer', () => { it('Should escape special characters', () => { let buffer: StringBuffer = [''] escapeToBuffer('I think this is good.', buffer) expect(buffer[0]).toBe('I <b>think</b> this is good.') buffer = [''] escapeToBuffer('John "Johnny" Smith', buffer) expect(buffer[0]).toBe('John "Johnny" Smith') }) }) })