feat(tests): add unit tests for email parsing functionality and MsgReader interop fix

This commit is contained in:
alam00000 committed 2026-05-08 22:09:46 +05:30
1 parent 8b6da83ba7
commit f169308439
2 files changed
+327 -1

No files matched your search

+6 -1
View File
@@ -1,5 +1,5 @@
import PostalMime from 'postal-mime';
import MsgReader from '@kenjiuno/msgreader';
import MsgReaderDefault from '@kenjiuno/msgreader';
import {
formatBytes,
escapeHtml,
@@ -9,6 +9,11 @@ import {
} from '../utils/helpers.js';
import type { EmailAttachment, ParsedEmail, EmailRenderOptions } from '@/types';
type MsgReaderCtor = typeof MsgReaderDefault;
const MsgReader: MsgReaderCtor =
(MsgReaderDefault as unknown as { default?: MsgReaderCtor }).default ??
MsgReaderDefault;
export type { EmailAttachment, ParsedEmail, EmailRenderOptions };
function formatAddress(