This commit is contained in:
2025-05-08 12:46:10 +00:00
parent 7aaf8f2595
commit 8b857e3d1d
26 changed files with 5215 additions and 142 deletions

View File

@ -12,7 +12,42 @@ import { Email } from '../ts/mail/core/classes.email.js';
let platformService: SzPlatformService;
tap.test('Setup test environment', async () => {
platformService = new SzPlatformService();
// Create platform service with default config from the config module
platformService = new SzPlatformService({
id: 'test-platform-service',
version: '1.0.0',
environment: 'test',
name: 'TestPlatformService',
enabled: true,
logging: {
level: 'info',
structured: true,
correlationTracking: true
},
server: {
enabled: true,
host: '0.0.0.0',
port: 3000,
cors: true
},
email: {
useMta: true,
mtaConfig: {
smtp: {
enabled: true,
port: 25,
hostname: 'mta.test.local',
maxSize: 10 * 1024 * 1024
},
security: {
useDkim: true,
verifyDkim: true,
verifySpf: true,
verifyDmarc: true
}
}
}
});
// Use start() instead of init() which doesn't exist
await platformService.start();
expect(platformService.mtaService).toBeTruthy();