import { describe, expect, it } from "bun:test"; import { formatBody, formatComments } from "../src/github/data/formatter"; import type { GitHubComment } from "../src/github/types"; describe("Sanitization Integration", () => { it("should sanitize complete issue/PR body with various hidden content patterns", () => { const issueBody = ` # Feature Request: Add user dashboard ## Description We need a new dashboard for users to track their activity. ## Technical Details The dashboard should display: - User statistics ![dashboard mockup with hidden​‌‍text](dashboard.png) - Activity graphs example graph description - Recent actions ## Implementation Notes See [documentation](https://docs.example.com "internal docs title") for API details.
The implementation should follow our standard patterns.
Additional notes: Text­with­soft­hyphens and Hidden encoded content. Direction override test: ‮reversed‬ text should be normalized.`; const imageUrlMap = new Map(); const result = formatBody(issueBody, imageUrlMap); // Verify hidden content is removed expect(result).not.toContain(" I've updated the proposal based on your suggestions. Test note: All systems checked. Ready for implementation`, author: { login: "author1" }, createdAt: "2023-01-01T12:00:00Z", }, ]; const result = formatComments(comments); // Verify hidden content is removed expect(result).not.toContain("