This commit is contained in:
2025-05-25 19:02:18 +00:00
parent 5b33623c2d
commit 4c9fd22a86
20 changed files with 1551 additions and 1451 deletions

View File

@ -1,12 +1,14 @@
import { tap, expect } from '@git.zone/tstest/tapbundle';
import { startTestSmtpServer } from '../../helpers/server.loader.js';
import { createSmtpClient } from '../../helpers/smtp.client.js';
import { startTestServer, stopTestServer, type ITestServer } from '../../helpers/server.loader.js';
import { createSmtpClient } from '../../../ts/mail/delivery/smtpclient/index.js';
let testServer: any;
let testServer: ITestServer;
tap.test('setup test SMTP server', async () => {
testServer = await startTestSmtpServer({
features: ['AUTH', 'AUTH=XOAUTH2', 'AUTH=OAUTHBEARER']
testServer = await startTestServer({
port: 2562,
tlsEnabled: false,
authRequired: true
});
expect(testServer).toBeTruthy();
expect(testServer.port).toBeGreaterThan(0);
@ -439,8 +441,8 @@ tap.test('CSEC-02: OAuth2 error handling', async () => {
tap.test('cleanup test SMTP server', async () => {
if (testServer) {
await testServer.stop();
await stopTestServer(testServer);
}
});
export default tap.start();
tap.start();