Merge branch 'issue16270' into ap-susp-update

This commit is contained in:
tamaina 2025-07-20 23:35:48 +09:00
commit de97a3e04b
2 changed files with 146 additions and 1282 deletions

View File

@ -45,8 +45,6 @@ describe('UserSuspendService', () => {
let globalEventService: jest.Mocked<GlobalEventService>; let globalEventService: jest.Mocked<GlobalEventService>;
let apRendererService: jest.Mocked<ApRendererService>; let apRendererService: jest.Mocked<ApRendererService>;
let moderationLogService: jest.Mocked<ModerationLogService>; let moderationLogService: jest.Mocked<ModerationLogService>;
let apDeliverManagerService: jest.Mocked<ApDeliverManagerService>;
let relayService: jest.Mocked<RelayService>;
async function createUser(data: Partial<MiUser> = {}): Promise<MiUser> { async function createUser(data: Partial<MiUser> = {}): Promise<MiUser> {
const user = { const user = {
@ -84,7 +82,7 @@ describe('UserSuspendService', () => {
return following; return following;
} }
beforeEach(async () => { beforeAll(async () => {
app = await Test.createTestingModule({ app = await Test.createTestingModule({
imports: [GlobalModule], imports: [GlobalModule],
providers: [ providers: [
@ -156,15 +154,10 @@ describe('UserSuspendService', () => {
globalEventService = app.get<GlobalEventService>(GlobalEventService) as jest.Mocked<GlobalEventService>; globalEventService = app.get<GlobalEventService>(GlobalEventService) as jest.Mocked<GlobalEventService>;
apRendererService = app.get<ApRendererService>(ApRendererService) as jest.Mocked<ApRendererService>; apRendererService = app.get<ApRendererService>(ApRendererService) as jest.Mocked<ApRendererService>;
moderationLogService = app.get<ModerationLogService>(ModerationLogService) as jest.Mocked<ModerationLogService>; moderationLogService = app.get<ModerationLogService>(ModerationLogService) as jest.Mocked<ModerationLogService>;
apDeliverManagerService = app.get<ApDeliverManagerService>(ApDeliverManagerService) as jest.Mocked<ApDeliverManagerService>;
relayService = app.get<RelayService>(RelayService) as jest.Mocked<RelayService>;
// Reset mocks
jest.clearAllMocks();
}); });
afterEach(async () => { beforeEach(() => {
await app.close(); jest.clearAllMocks();
}); });
describe('suspend', () => { describe('suspend', () => {

File diff suppressed because it is too large Load Diff