style(auth): 优化auth模块代码规范
范围: src/business/auth/ - register.service.ts: 清理未使用的导入TokenPair,增强userId非空验证 - register.service.spec.ts: 清理未使用的变量apiKeySecurityService
This commit is contained in:
@@ -7,12 +7,13 @@
|
||||
* - 测试Zulip账号集成
|
||||
*
|
||||
* 最近修改:
|
||||
* - 2026-01-15: 代码规范优化 - 清理未使用的变量apiKeySecurityService (修改者: moyin)
|
||||
* - 2026-01-12: 代码分离 - 从login.service.spec.ts中分离注册相关测试
|
||||
*
|
||||
* @author moyin
|
||||
* @version 1.0.0
|
||||
* @version 1.0.1
|
||||
* @since 2026-01-12
|
||||
* @lastModified 2026-01-12
|
||||
* @lastModified 2026-01-15
|
||||
*/
|
||||
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
@@ -25,7 +26,6 @@ describe('RegisterService', () => {
|
||||
let service: RegisterService;
|
||||
let loginCoreService: jest.Mocked<LoginCoreService>;
|
||||
let zulipAccountService: jest.Mocked<ZulipAccountService>;
|
||||
let apiKeySecurityService: jest.Mocked<ApiKeySecurityService>;
|
||||
|
||||
const mockUser = {
|
||||
id: BigInt(1),
|
||||
@@ -96,7 +96,6 @@ describe('RegisterService', () => {
|
||||
service = module.get<RegisterService>(RegisterService);
|
||||
loginCoreService = module.get(LoginCoreService);
|
||||
zulipAccountService = module.get(ZulipAccountService);
|
||||
apiKeySecurityService = module.get(ApiKeySecurityService);
|
||||
|
||||
// 设置默认的mock返回值
|
||||
const mockTokenPair = {
|
||||
|
||||
Reference in New Issue
Block a user