update
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { tap, expect } from '@git.zone/tstest/tapbundle';
|
||||
import * as net from 'net';
|
||||
import { startTestServer, stopTestServer } from '../server.loader.js';
|
||||
import { startTestServer, stopTestServer } from '../../helpers/server.loader.js';
|
||||
import type { SmtpServer } from '../../../ts/mail/delivery/smtpserver/index.js';
|
||||
|
||||
const TEST_PORT = 2525;
|
||||
@ -62,7 +62,7 @@ tap.test('Connection Rejection - should handle suspicious domains', async (tools
|
||||
// We just verify it responds appropriately
|
||||
const validResponses = ['250', '421', '550', '501'];
|
||||
const hasValidResponse = validResponses.some(code => response.includes(code));
|
||||
expect(hasValidResponse).toBeTrue();
|
||||
expect(hasValidResponse).toEqual(true);
|
||||
|
||||
// Clean up
|
||||
if (!socket.destroyed) {
|
||||
@ -151,7 +151,7 @@ tap.test('Connection Rejection - should handle overload conditions', async (tool
|
||||
|
||||
// Either behavior is acceptable - rejection shows overload protection,
|
||||
// acceptance shows high capacity
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
} finally {
|
||||
// Clean up all connections
|
||||
@ -225,7 +225,7 @@ tap.test('Connection Rejection - should reject invalid protocol', async (tools)
|
||||
const hasErrorResponse = errorResponses.some(code => response.includes(code));
|
||||
const closedWithoutResponse = response === 'CLOSED_WITHOUT_RESPONSE' || response === '';
|
||||
|
||||
expect(hasErrorResponse || closedWithoutResponse).toBeTrue();
|
||||
expect(hasErrorResponse || closedWithoutResponse).toEqual(true);
|
||||
|
||||
if (hasErrorResponse) {
|
||||
console.log('Server properly rejected with error response');
|
||||
@ -291,7 +291,7 @@ tap.test('Connection Rejection - should handle invalid commands gracefully', asy
|
||||
|
||||
tap.test('cleanup - stop SMTP server', async () => {
|
||||
await stopTestServer();
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
});
|
||||
|
||||
tap.start();
|
Reference in New Issue
Block a user