fix merge

This commit is contained in:
samunohito 2024-07-03 07:22:41 +09:00
parent 50e1ee18fa
commit b78aa56dcd
1 changed files with 9 additions and 7 deletions

View File

@ -14,15 +14,17 @@ import { IdService } from '@/core/IdService.js';
import { ChannelMutingService } from '@/core/ChannelMutingService.js'; import { ChannelMutingService } from '@/core/ChannelMutingService.js';
import { import {
ChannelMutingRepository, ChannelMutingRepository,
ChannelsRepository, DriveFilesRepository, ChannelsRepository,
DriveFilesRepository,
MiChannel, MiChannel,
MiChannelMuting, MiDriveFile, MiChannelMuting,
MiDriveFile,
MiUser, MiUser,
UserProfilesRepository, UserProfilesRepository,
UsersRepository, UsersRepository,
} from '@/models/_.js'; } from '@/models/_.js';
import { DI } from '@/di-symbols.js'; import { DI } from '@/di-symbols.js';
import { sleep } from "../utils.js"; import { setTimeout } from 'node:timers/promises';
describe('ChannelMutingService', () => { describe('ChannelMutingService', () => {
let app: TestingModule; let app: TestingModule;
@ -269,7 +271,7 @@ describe('ChannelMutingService', () => {
await service.mute({ requestUserId: alice.id, targetChannelId: channel1.id }); await service.mute({ requestUserId: alice.id, targetChannelId: channel1.id });
await service.mute({ requestUserId: alice.id, targetChannelId: channel2.id }); await service.mute({ requestUserId: alice.id, targetChannelId: channel2.id });
await sleep(500); await setTimeout(500);
const result = await service.isMuted({ requestUserId: alice.id, targetChannelId: channel1.id }); const result = await service.isMuted({ requestUserId: alice.id, targetChannelId: channel1.id });
@ -279,7 +281,7 @@ describe('ChannelMutingService', () => {
test('isMuted: false', async () => { test('isMuted: false', async () => {
await service.mute({ requestUserId: alice.id, targetChannelId: channel2.id }); await service.mute({ requestUserId: alice.id, targetChannelId: channel2.id });
await sleep(500); await setTimeout(500);
const result = await service.isMuted({ requestUserId: alice.id, targetChannelId: channel1.id }); const result = await service.isMuted({ requestUserId: alice.id, targetChannelId: channel1.id });