import { describe, it, expect, afterEach } from 'vitest'; import { cleanup, render } from 'vitest-browser-svelte'; import { tick } from 'svelte'; import * as m from '$lib/paraglide/messages.js'; import EventNote from './EventNote.svelte'; afterEach(() => cleanup()); const LONG_NOTE = Array.from({ length: 15 }, (_, i) => `Zeile ${i + 1}`).join('\n'); describe('EventNote (REQ-002–008)', () => { it('escapesHtml — renders XSS payload as inert text, no injected element (REQ-002)', () => { render(EventNote, { description: '' }); // The literal string should appear as text content expect(document.body.textContent).toContain(''); // No injected