Refactor tests to remove redundancy and improve structure

- Remove redundant 'mixed input patterns' test from sanitizer.test.ts
- Consolidate integration tests into 2 focused real-world scenarios
- Add HTML comment stripping to sanitizeContent function
- Update test expectations to match sanitization behavior
- Maintain full coverage with fewer, more focused tests
This commit is contained in:
Lina Tawfik
2025-05-28 18:12:07 -07:00
parent 046ef964a9
commit cf04e19dbc
3 changed files with 91 additions and 134 deletions

View File

@@ -52,6 +52,7 @@ export function normalizeHtmlEntities(content: string): string {
}
export function sanitizeContent(content: string): string {
content = stripHtmlComments(content);
content = stripInvisibleCharacters(content);
content = stripMarkdownImageAltText(content);
content = stripMarkdownLinkTitles(content);