import { describe, expect, it } from "vitest"; import { sanitizeComposedHostProps } from "./sanitize-composed-host-props"; describe("sanitizeComposedHostProps", () => { it("strips markup and actionable semantic props from external host props", () => { const handler = () => undefined; const sanitized = sanitizeComposedHostProps({ contentEditable: true, contenteditable: "true", dangerouslySetInnerHTML: { __html: "" }, onClick: () => undefined, onClickCapture: () => undefined, onContextMenu: handler, onContextMenuCapture: handler, onDoubleClick: handler, onDoubleClickCapture: handler, onDrag: handler, onDragCapture: handler, onDragEnd: handler, onDragEndCapture: handler, onDragEnter: handler, onDragEnterCapture: handler, onDragLeave: handler, onDragLeaveCapture: handler, onDragOver: handler, onDragOverCapture: handler, onDragStart: handler, onDragStartCapture: handler, onDrop: handler, onDropCapture: handler, onFocus: handler, onFocusCapture: handler, onclickcapture: () => undefined, onKeyDown: () => undefined, onKeyDownCapture: () => undefined, onkeydowncapture: () => undefined, onKeyPress: () => undefined, onKeyPressCapture: () => undefined, onkeypresscapture: () => undefined, onKeyUp: () => undefined, onKeyUpCapture: () => undefined, onkeyupcapture: () => undefined, onMouseDown: handler, onMouseDownCapture: handler, onMouseEnter: handler, onMouseLeave: handler, onMouseMove: handler, onMouseMoveCapture: handler, onMouseOut: handler, onMouseOutCapture: handler, onMouseOver: handler, onMouseOverCapture: handler, onMouseUp: handler, onMouseUpCapture: handler, onPointerCancel: handler, onPointerCancelCapture: handler, onPointerDown: handler, onPointerDownCapture: handler, onPointerEnter: handler, onPointerLeave: handler, onPointerMove: handler, onPointerMoveCapture: handler, onPointerOut: handler, onPointerOutCapture: handler, onPointerOver: handler, onPointerOverCapture: handler, onPointerUp: handler, onPointerUpCapture: handler, onTouchCancel: handler, onTouchCancelCapture: handler, onTouchEnd: handler, onTouchEndCapture: handler, onTouchMove: handler, onTouchMoveCapture: handler, onTouchStart: handler, onTouchStartCapture: handler, onWheel: handler, onWheelCapture: handler, onBlur: handler, onBlurCapture: handler, onBeforeInput: handler, onBeforeInputCapture: handler, onChange: handler, onChangeCapture: handler, onCompositionEnd: handler, onCompositionEndCapture: handler, onCompositionStart: handler, onCompositionStartCapture: handler, onCompositionUpdate: handler, onCompositionUpdateCapture: handler, onCopy: handler, onCopyCapture: handler, onCut: handler, onCutCapture: handler, onInput: handler, onInputCapture: handler, onInvalid: handler, onInvalidCapture: handler, onPaste: handler, onPasteCapture: handler, onReset: handler, onResetCapture: handler, onSelect: handler, onSelectCapture: handler, onSubmit: handler, onSubmitCapture: handler, onToggle: handler, role: "button", srcDoc: "", srcdoc: "