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;
|
||||
@ -157,7 +157,7 @@ tap.test('Attachment Handling - Multiple file types', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Email with multiple attachments accepted successfully');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -253,7 +253,7 @@ tap.test('Attachment Handling - Large attachment', async (tools) => {
|
||||
const rejected = dataBuffer.includes('552'); // Size exceeded
|
||||
|
||||
console.log(`Large attachment: ${accepted ? 'accepted' : 'rejected (size limit)'}`);
|
||||
expect(accepted || rejected).toBeTrue();
|
||||
expect(accepted || rejected).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -361,7 +361,7 @@ tap.test('Attachment Handling - Inline vs attachment disposition', async (tools)
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Email with inline and attachment dispositions accepted');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -472,7 +472,7 @@ tap.test('Attachment Handling - Filename encoding', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Email with various filename encodings accepted');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -577,7 +577,7 @@ tap.test('Attachment Handling - Empty and malformed attachments', async (tools)
|
||||
completed = true;
|
||||
const result = dataBuffer.includes('250') ? 'accepted' : 'rejected';
|
||||
console.log(`Email with malformed attachments ${result}`);
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
|
@ -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';
|
||||
|
||||
// Test configuration
|
||||
|
@ -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;
|
||||
@ -141,7 +141,7 @@ tap.test('DSN - Success notification request', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Email with DSN success request accepted');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -228,7 +228,7 @@ tap.test('DSN - Multiple notification types', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Email with multiple DSN types accepted');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -280,7 +280,7 @@ tap.test('DSN - Never notify', async (tools) => {
|
||||
const notSupported = dataBuffer.includes('501') || dataBuffer.includes('555');
|
||||
|
||||
console.log(`NOTIFY=NEVER: ${accepted ? 'accepted' : notSupported ? 'not supported' : 'error'}`);
|
||||
expect(accepted || notSupported).toBeTrue();
|
||||
expect(accepted || notSupported).toEqual(true);
|
||||
|
||||
if (notSupported) {
|
||||
socket.write('RCPT TO:<recipient@example.com>\r\n');
|
||||
@ -315,7 +315,7 @@ tap.test('DSN - Never notify', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Email with NOTIFY=NEVER accepted');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -401,7 +401,7 @@ tap.test('DSN - Original recipient tracking', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Email with ORCPT tracking accepted');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -464,7 +464,7 @@ tap.test('DSN - Return parameter handling', async (tools) => {
|
||||
const notSupported = dataBuffer.includes('501') || dataBuffer.includes('555');
|
||||
|
||||
console.log(`RET=FULL: ${accepted ? 'accepted' : notSupported ? 'not supported' : 'error'}`);
|
||||
expect(accepted || notSupported).toBeTrue();
|
||||
expect(accepted || notSupported).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
|
@ -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;
|
||||
@ -79,7 +79,7 @@ tap.test('Email Routing - Local domain routing', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Local domain email routed successfully');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -162,7 +162,7 @@ tap.test('Email Routing - External domain routing', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('External domain email accepted for relay');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -246,7 +246,7 @@ tap.test('Email Routing - Multiple recipients', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Email with multiple recipients routed successfully');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -504,7 +504,7 @@ tap.test('Email Routing - Subdomain routing', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Subdomain routing test completed');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
|
@ -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';
|
||||
|
||||
// Test configuration
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { tap, expect } from '@git.zone/tstest/tapbundle';
|
||||
import * as net from 'net';
|
||||
import * as path from 'path';
|
||||
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';
|
||||
|
||||
// Test configuration
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { tap, expect } from '@git.zone/tstest/tapbundle';
|
||||
import * as net from 'net';
|
||||
import { startTestServer, stopTestServer, TEST_PORT, sendEmailWithRawSocket } from '../server.loader.js';
|
||||
import { startTestServer, stopTestServer, TEST_PORT, sendEmailWithRawSocket } from '../../helpers/server.loader.js';
|
||||
import type { SmtpServer } from '../../../ts/mail/delivery/smtpserver/index.js';
|
||||
|
||||
let testServer: SmtpServer;
|
||||
@ -130,7 +130,7 @@ tap.test('MIME Handling - Comprehensive multipart message', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Complex MIME message accepted successfully');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -207,7 +207,7 @@ tap.test('MIME Handling - Quoted-printable encoding', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Quoted-printable encoded email accepted');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -296,7 +296,7 @@ tap.test('MIME Handling - Base64 encoding', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Base64 encoded email accepted');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -396,7 +396,7 @@ tap.test('MIME Handling - Content-Disposition headers', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Email with various Content-Disposition headers accepted');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -490,7 +490,7 @@ tap.test('MIME Handling - International character sets', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Email with international character sets accepted');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { tap, expect } from '@git.zone/tstest/tapbundle';
|
||||
import * as net from 'net';
|
||||
import * as path from 'path';
|
||||
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';
|
||||
|
||||
// Test configuration
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { tap, expect } from '@git.zone/tstest/tapbundle';
|
||||
import * as net from 'net';
|
||||
import { startTestServer, stopTestServer, TEST_PORT, sendEmailWithRawSocket } from '../server.loader.js';
|
||||
import { startTestServer, stopTestServer, TEST_PORT, sendEmailWithRawSocket } from '../../helpers/server.loader.js';
|
||||
|
||||
let testServer: any;
|
||||
|
||||
@ -107,7 +107,7 @@ tap.test('Special Character Handling - Comprehensive Unicode test', async (tools
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Email with special characters accepted successfully');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -195,7 +195,7 @@ tap.test('Special Character Handling - Control characters', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Email with control characters accepted');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -266,7 +266,7 @@ tap.test('Special Character Handling - Subject header encoding', async (tools) =
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Email with encoded subject headers accepted');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -338,7 +338,7 @@ tap.test('Special Character Handling - Address headers with special chars', asyn
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Email with special characters in addresses accepted');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -435,7 +435,7 @@ tap.test('Special Character Handling - Mixed encodings', async (tools) => {
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
console.log('Email with mixed character encodings accepted');
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
|
Reference in New Issue
Block a user