update
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
import { tap, expect } from '@git.zone/tstest/tapbundle';
|
||||
import * as plugins from '../ts/plugins.js';
|
||||
import * as paths from '../ts/paths.js';
|
||||
import { SmtpClient } from '../ts/mail/delivery/classes.smtp.client.js';
|
||||
import type { ISmtpClientOptions } from '../ts/mail/delivery/classes.smtp.client.js';
|
||||
import { smtpClientMod } from '../ts/mail/delivery/index.js';
|
||||
import type { ISmtpClientOptions, SmtpClient } from '../ts/mail/delivery/smtpclient/index.js';
|
||||
import { Email } from '../ts/mail/core/classes.email.js';
|
||||
|
||||
/**
|
||||
@ -19,7 +19,7 @@ tap.test('verify SMTP client initialization', async () => {
|
||||
};
|
||||
|
||||
// Create SMTP client instance
|
||||
const smtpClient = new SmtpClient(options);
|
||||
const smtpClient = smtpClientMod.createSmtpClient(options);
|
||||
|
||||
// Verify instance was created correctly
|
||||
expect(smtpClient).toBeTruthy();
|
||||
@ -35,7 +35,7 @@ tap.test('test SMTP client configuration update', async () => {
|
||||
};
|
||||
|
||||
// Create SMTP client instance
|
||||
const smtpClient = new SmtpClient(options);
|
||||
const smtpClient = smtpClientMod.createSmtpClient(options);
|
||||
|
||||
// Update configuration
|
||||
smtpClient.updateOptions({
|
||||
@ -117,7 +117,7 @@ tap.test('verify SMTP client email delivery functionality with mock', async () =
|
||||
};
|
||||
|
||||
// Create SMTP client instance
|
||||
const smtpClient = new SmtpClient(options);
|
||||
const smtpClient = smtpClientMod.createSmtpClient(options);
|
||||
|
||||
// Test public methods exist and have correct signatures
|
||||
expect(typeof smtpClient.sendMail).toEqual('function');
|
||||
@ -144,7 +144,7 @@ tap.test('verify SMTP client email delivery functionality with mock', async () =
|
||||
|
||||
tap.test('test SMTP client error handling with mock', async () => {
|
||||
// Create SMTP client instance
|
||||
const smtpClient = new SmtpClient({
|
||||
const smtpClient = smtpClientMod.createSmtpClient({
|
||||
host: 'smtp.example.com',
|
||||
port: 587,
|
||||
secure: false
|
||||
|
Reference in New Issue
Block a user