Merge branch 'main' of https://gitea.xinghangee.icu/datawhale/whale-town-end into ANGJustinl-main
This commit is contained in:
@@ -72,7 +72,7 @@ describe('EmailService', () => {
|
||||
configService.get.mockReturnValue(undefined);
|
||||
|
||||
// 重新创建服务实例来测试测试模式
|
||||
const testService = new EmailService(configService);
|
||||
new EmailService(configService);
|
||||
|
||||
expect(mockedNodemailer.createTransport).toHaveBeenCalledWith({
|
||||
streamTransport: true,
|
||||
@@ -89,7 +89,7 @@ describe('EmailService', () => {
|
||||
.mockReturnValueOnce('test@gmail.com') // EMAIL_USER
|
||||
.mockReturnValueOnce('password'); // EMAIL_PASS
|
||||
|
||||
const testService = new EmailService(configService);
|
||||
new EmailService(configService);
|
||||
|
||||
expect(mockedNodemailer.createTransport).toHaveBeenCalledWith({
|
||||
host: 'smtp.gmail.com',
|
||||
@@ -403,7 +403,7 @@ describe('EmailService', () => {
|
||||
.mockReturnValueOnce(undefined) // EMAIL_USER
|
||||
.mockReturnValueOnce(undefined); // EMAIL_PASS
|
||||
|
||||
const testService = new EmailService(configService);
|
||||
new EmailService(configService);
|
||||
|
||||
expect(configService.get).toHaveBeenCalledWith('EMAIL_HOST', 'smtp.gmail.com');
|
||||
expect(configService.get).toHaveBeenCalledWith('EMAIL_PORT', 587);
|
||||
@@ -418,7 +418,7 @@ describe('EmailService', () => {
|
||||
.mockReturnValueOnce('custom@163.com') // EMAIL_USER
|
||||
.mockReturnValueOnce('custompass'); // EMAIL_PASS
|
||||
|
||||
const testService = new EmailService(configService);
|
||||
new EmailService(configService);
|
||||
|
||||
expect(mockedNodemailer.createTransport).toHaveBeenCalledWith({
|
||||
host: 'smtp.163.com',
|
||||
|
||||
Reference in New Issue
Block a user