update
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||
import * as plugins from './plugins.js';
|
||||
import { createTestServer } from '../../helpers/server.loader.js';
|
||||
import { createSmtpClient } from '../../helpers/smtp.client.js';
|
||||
import { createTestSmtpClient } from '../../helpers/smtp.client.js';
|
||||
import { Email } from '../../../ts/index.js';
|
||||
|
||||
tap.test('CRFC-08: should handle SMTP extensions correctly (Various RFCs)', async (tools) => {
|
||||
const testId = 'CRFC-08-smtp-extensions';
|
||||
@ -78,7 +78,7 @@ tap.test('CRFC-08: should handle SMTP extensions correctly (Various RFCs)', asyn
|
||||
}
|
||||
});
|
||||
|
||||
const smtpClient = createSmtpClient({
|
||||
const smtpClient = createTestSmtpClient({
|
||||
host: testServer.hostname,
|
||||
port: testServer.port,
|
||||
secure: false
|
||||
@ -90,7 +90,7 @@ tap.test('CRFC-08: should handle SMTP extensions correctly (Various RFCs)', asyn
|
||||
binaryContent[i] = i % 256;
|
||||
}
|
||||
|
||||
const email = new plugins.smartmail.Email({
|
||||
const email = new Email({
|
||||
from: 'sender@example.com',
|
||||
to: ['recipient@example.com'],
|
||||
subject: 'CHUNKING test',
|
||||
@ -160,14 +160,14 @@ tap.test('CRFC-08: should handle SMTP extensions correctly (Various RFCs)', asyn
|
||||
}
|
||||
});
|
||||
|
||||
const smtpClient = createSmtpClient({
|
||||
const smtpClient = createTestSmtpClient({
|
||||
host: testServer.hostname,
|
||||
port: testServer.port,
|
||||
secure: false
|
||||
});
|
||||
|
||||
// Test with delivery deadline
|
||||
const email = new plugins.smartmail.Email({
|
||||
const email = new Email({
|
||||
from: 'sender@example.com',
|
||||
to: ['urgent@example.com'],
|
||||
subject: 'Urgent delivery test',
|
||||
@ -624,14 +624,14 @@ tap.test('CRFC-08: should handle SMTP extensions correctly (Various RFCs)', asyn
|
||||
}
|
||||
});
|
||||
|
||||
const smtpClient = createSmtpClient({
|
||||
const smtpClient = createTestSmtpClient({
|
||||
host: testServer.hostname,
|
||||
port: testServer.port,
|
||||
secure: false
|
||||
});
|
||||
|
||||
// Test email that could use multiple extensions
|
||||
const email = new plugins.smartmail.Email({
|
||||
const email = new Email({
|
||||
from: 'sender@example.com',
|
||||
to: ['recipient@example.com'],
|
||||
subject: 'Extension combination test with UTF-8: 测试',
|
||||
@ -651,4 +651,6 @@ tap.test('CRFC-08: should handle SMTP extensions correctly (Various RFCs)', asyn
|
||||
})();
|
||||
|
||||
console.log(`\n${testId}: All ${scenarioCount} SMTP extension scenarios tested ✓`);
|
||||
});
|
||||
});
|
||||
|
||||
tap.start();
|
Reference in New Issue
Block a user