mirror of
https://github.com/root-fr/jmap-webmail.git
synced 2026-09-25 08:01:16 +00:00
- Setup Vitest testing framework with React Testing Library - Add 27 test cases for email-sanitization.ts - XSS prevention (scripts, event handlers, iframes) - Safe HTML preservation (tables, formatting) - Signature-specific sanitization rules - HTML parsing safety checks - Add 29 test cases for validation.ts - RFC 5322 email validation - Header injection prevention - Length limit enforcement - Email list validation Coverage: >90% for both security-critical utilities Zero new runtime dependencies (dev-only) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
9 lines
185 B
TypeScript
9 lines
185 B
TypeScript
import '@testing-library/jest-dom';
|
|
import { cleanup } from '@testing-library/react';
|
|
import { afterEach } from 'vitest';
|
|
|
|
// Cleanup after each test
|
|
afterEach(() => {
|
|
cleanup();
|
|
});
|