feat: 新增 YYDS Mail 邮箱服务端点

This commit is contained in:
Q3CC
2026-05-16 21:58:14 +08:00
parent cfd2ac14e5
commit b2c8280476
14 changed files with 1211 additions and 3 deletions
+12
View File
@@ -3,6 +3,7 @@ const assert = require('node:assert/strict');
const {
HOTMAIL_PROVIDER,
YYDS_MAIL_PROVIDER,
getIcloudForwardMailConfig,
getIcloudForwardMailProviderOptions,
getMailProviderConfig,
@@ -14,6 +15,7 @@ const {
test('normalizeMailProvider accepts 126 and falls back to 163', () => {
assert.equal(normalizeMailProvider('126'), '126');
assert.equal(normalizeMailProvider('163-vip'), '163-vip');
assert.equal(normalizeMailProvider(YYDS_MAIL_PROVIDER), YYDS_MAIL_PROVIDER);
assert.equal(normalizeMailProvider('unknown-provider'), '163');
});
@@ -38,6 +40,16 @@ test('getMailProviderConfig preserves the hotmail provider sentinel', () => {
);
});
test('getMailProviderConfig preserves the YYDS Mail provider sentinel', () => {
assert.deepEqual(
getMailProviderConfig({ mailProvider: YYDS_MAIL_PROVIDER }),
{
provider: YYDS_MAIL_PROVIDER,
label: 'YYDS Mail',
}
);
});
test('iCloud forward mailbox helpers normalize and expose supported providers', () => {
assert.equal(normalizeIcloudTargetMailboxType('forward-mailbox'), 'forward-mailbox');
assert.equal(normalizeIcloudTargetMailboxType('unknown'), 'icloud-inbox');