refactor(server): mail service (#10934)

This commit is contained in:
forehalo
2025-03-19 17:00:19 +00:00
parent b3a245f47a
commit 21c4a29f55
47 changed files with 2076 additions and 2131 deletions
@@ -13,6 +13,8 @@ import {
} from '../../base';
import { SocketIoAdapter } from '../../base/websocket';
import { AuthGuard } from '../../core/auth';
import { Mailer } from '../../core/mail';
import { MockMailer } from '../mocks';
import { TEST_LOG_LEVEL } from '../utils';
interface TestingAppMetadata {
@@ -21,6 +23,10 @@ interface TestingAppMetadata {
}
export class TestingApp extends NestApplication {
get mails() {
return this.get(Mailer, { strict: false }) as MockMailer;
}
async [Symbol.asyncDispose]() {
await this.close();
}