- Integrated DOMPurify for sanitizing HTML in tests. - Added error handling for DOMPurify initialization to ensure robustness. - Made DOMPurify globally accessible in the test environment.