import { describe, it, expect } from 'vitest' import { sanitizeHtml, replaceCidReferences } from '../sanitize.js' describe('sanitizeHtml', () => { it('should return undefined for undefined input', () => { expect(sanitizeHtml(undefined)).toBeUndefined() }) it('should return undefined for empty string', () => { expect(sanitizeHtml('')).toBeUndefined() }) it('should sanitize basic HTML', () => { const html = '
Hello World
' const result = sanitizeHtml(html) expect(result).toContain('Hello World') }) it('should remove script tags', () => { const html = 'Safe
' const result = sanitizeHtml(html) expect(result).not.toContain('