feat(storage): add comprehensive tests for StorageManager with memory, filesystem, and custom function backends
Some checks failed
CI / Type Check & Lint (push) Failing after 3s
CI / Build Test (Current Platform) (push) Failing after 3s
CI / Build All Platforms (push) Failing after 3s

feat(email): implement EmailSendJob class for robust email delivery with retry logic and MX record resolution

feat(mail): restructure mail module exports for simplified access to core and delivery functionalities
This commit is contained in:
2025-10-28 19:46:17 +00:00
parent 6523c55516
commit 17f5661636
271 changed files with 61736 additions and 6222 deletions

View File

@@ -0,0 +1,50 @@
import { tap, expect } from '@git.zone/tstest/tapbundle';
import { createTestServer } from '../../helpers/server.loader.ts';
import { createTestSmtpClient } from '../../helpers/smtp.client.ts';
import { Email } from '../../../ts/mail/core/classes.email.ts';
tap.test('CPERF-08: DNS Caching Tests', async () => {
console.log('\n🌐 Testing SMTP Client DNS Caching');
console.log('=' .repeat(60));
const testServer = await createTestServer({});
try {
console.log('\nTest: DNS caching with multiple connections');
// Create multiple clients to test DNS caching
const clients = [];
for (let i = 0; i < 3; i++) {
const smtpClient = createTestSmtpClient({
host: testServer.hostname,
port: testServer.port
});
clients.push(smtpClient);
console.log(` ✓ Client ${i + 1} created (DNS should be cached)`);
}
// Send email with first client
const email = new Email({
from: 'sender@example.com',
to: 'recipient@example.com',
subject: 'DNS Caching Test',
text: 'Testing DNS caching efficiency'
});
const result = await clients[0].sendMail(email);
console.log(' ✓ Email sent successfully');
expect(result).toBeDefined();
// Clean up all clients
clients.forEach(client => client.close());
console.log(' ✓ All clients closed');
console.log('\n✅ CPERF-08: DNS caching tests completed');
} finally {
testServer.server.close();
}
});
tap.start();