import { describe, expect, it } from "vitest";
import { renderIntroMarkdown } from "./markdown.js";
/**
* TASK-0107 DoD — "XSS vectors stripped (sanitizer test list)".
*
* `renderIntroMarkdown` is the ONLY way a form's `config.intro` (an
* OWNER-supplied, publicly rendered string) reaches the DOM. The contract
* (see markdown.ts) is: HTML-escape the ENTIRE input first, then apply a
* strict block grammar + an allow-list of inline transforms
* (strong / em / http(s)-only links). So the ONLY HTML the function can emit
* is the literal tags it inserts itself. This suite pins that contract.
*
* Two assertions per vector class:
* 1. the DANGEROUS token never appears as a live tag/attribute in the
* output (it is either escaped or dropped), AND
* 2. the legitimate transforms the feature actually promises still work
* (the sanitizer is not so aggressive it breaks the feature).
*/
const VECTORS = [
// classic script injection
"",
"",
"",
// event-handler injection on common elements
"",
"