Merge branch 'issue16270' into ap-susp-update
This commit is contained in:
commit
de97a3e04b
|
@ -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', () => {
|
||||||
|
|
1415
pnpm-lock.yaml
1415
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue