1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-14 16:56:00 +02:00

Merge branch 'develop' into renovate/major-backend-update-dependencies

This commit is contained in:
かっこかり
2025-07-17 11:15:06 +09:00
committed by GitHub
326 changed files with 7751 additions and 2423 deletions

View File

@@ -7,9 +7,10 @@
import { Test, TestingModule } from '@nestjs/testing';
import { FlashService } from '@/core/FlashService.js';
import { IdService } from '@/core/IdService.js';
import { FlashsRepository, MiFlash, MiUser, UserProfilesRepository, UsersRepository } from '@/models/_.js';
import { FlashLikesRepository, FlashsRepository, MiFlash, MiUser, UserProfilesRepository, UsersRepository } from '@/models/_.js';
import { DI } from '@/di-symbols.js';
import { GlobalModule } from '@/GlobalModule.js';
import { CoreModule } from '@/core/CoreModule.js';
describe('FlashService', () => {
let app: TestingModule;
@@ -18,6 +19,7 @@ describe('FlashService', () => {
// --------------------------------------------------------------------------------------
let flashsRepository: FlashsRepository;
let flashLikesRepository: FlashLikesRepository;
let usersRepository: UsersRepository;
let userProfilesRepository: UserProfilesRepository;
let idService: IdService;
@@ -65,6 +67,7 @@ describe('FlashService', () => {
app = await Test.createTestingModule({
imports: [
GlobalModule,
CoreModule,
],
providers: [
FlashService,
@@ -75,6 +78,7 @@ describe('FlashService', () => {
service = app.get(FlashService);
flashsRepository = app.get(DI.flashsRepository);
flashLikesRepository = app.get(DI.flashLikesRepository);
usersRepository = app.get(DI.usersRepository);
userProfilesRepository = app.get(DI.userProfilesRepository);
idService = app.get(IdService);
@@ -88,6 +92,7 @@ describe('FlashService', () => {
await usersRepository.createQueryBuilder().delete().execute();
await userProfilesRepository.createQueryBuilder().delete().execute();
await flashsRepository.createQueryBuilder().delete().execute();
await flashLikesRepository.createQueryBuilder().delete().execute();
});
afterAll(async () => {

View File

@@ -21,73 +21,73 @@ describe('ReactionService', () => {
});
describe('normalize', () => {
test('絵文字リアクションはそのまま', async () => {
assert.strictEqual(await reactionService.normalize('👍'), '👍');
assert.strictEqual(await reactionService.normalize('🍅'), '🍅');
test('絵文字リアクションはそのまま', () => {
assert.strictEqual(reactionService.normalize('👍'), '👍');
assert.strictEqual(reactionService.normalize('🍅'), '🍅');
});
test('既存のリアクションは絵文字化する pudding', async () => {
assert.strictEqual(await reactionService.normalize('pudding'), '🍮');
test('既存のリアクションは絵文字化する pudding', () => {
assert.strictEqual(reactionService.normalize('pudding'), '🍮');
});
test('既存のリアクションは絵文字化する like', async () => {
assert.strictEqual(await reactionService.normalize('like'), '👍');
test('既存のリアクションは絵文字化する like', () => {
assert.strictEqual(reactionService.normalize('like'), '👍');
});
test('既存のリアクションは絵文字化する love', async () => {
assert.strictEqual(await reactionService.normalize('love'), '❤');
test('既存のリアクションは絵文字化する love', () => {
assert.strictEqual(reactionService.normalize('love'), '❤');
});
test('既存のリアクションは絵文字化する laugh', async () => {
assert.strictEqual(await reactionService.normalize('laugh'), '😆');
test('既存のリアクションは絵文字化する laugh', () => {
assert.strictEqual(reactionService.normalize('laugh'), '😆');
});
test('既存のリアクションは絵文字化する hmm', async () => {
assert.strictEqual(await reactionService.normalize('hmm'), '🤔');
test('既存のリアクションは絵文字化する hmm', () => {
assert.strictEqual(reactionService.normalize('hmm'), '🤔');
});
test('既存のリアクションは絵文字化する surprise', async () => {
assert.strictEqual(await reactionService.normalize('surprise'), '😮');
test('既存のリアクションは絵文字化する surprise', () => {
assert.strictEqual(reactionService.normalize('surprise'), '😮');
});
test('既存のリアクションは絵文字化する congrats', async () => {
assert.strictEqual(await reactionService.normalize('congrats'), '🎉');
test('既存のリアクションは絵文字化する congrats', () => {
assert.strictEqual(reactionService.normalize('congrats'), '🎉');
});
test('既存のリアクションは絵文字化する angry', async () => {
assert.strictEqual(await reactionService.normalize('angry'), '💢');
test('既存のリアクションは絵文字化する angry', () => {
assert.strictEqual(reactionService.normalize('angry'), '💢');
});
test('既存のリアクションは絵文字化する confused', async () => {
assert.strictEqual(await reactionService.normalize('confused'), '😥');
test('既存のリアクションは絵文字化する confused', () => {
assert.strictEqual(reactionService.normalize('confused'), '😥');
});
test('既存のリアクションは絵文字化する rip', async () => {
assert.strictEqual(await reactionService.normalize('rip'), '😇');
test('既存のリアクションは絵文字化する rip', () => {
assert.strictEqual(reactionService.normalize('rip'), '😇');
});
test('既存のリアクションは絵文字化する star', async () => {
assert.strictEqual(await reactionService.normalize('star'), '⭐');
test('既存のリアクションは絵文字化する star', () => {
assert.strictEqual(reactionService.normalize('star'), '⭐');
});
test('異体字セレクタ除去', async () => {
assert.strictEqual(await reactionService.normalize('㊗️'), '㊗');
test('異体字セレクタ除去', () => {
assert.strictEqual(reactionService.normalize('㊗️'), '㊗');
});
test('異体字セレクタ除去 必要なし', async () => {
assert.strictEqual(await reactionService.normalize('㊗'), '㊗');
test('異体字セレクタ除去 必要なし', () => {
assert.strictEqual(reactionService.normalize('㊗'), '㊗');
});
test('fallback - null', async () => {
assert.strictEqual(await reactionService.normalize(null), '❤');
test('fallback - null', () => {
assert.strictEqual(reactionService.normalize(null), '❤');
});
test('fallback - empty', async () => {
assert.strictEqual(await reactionService.normalize(''), '❤');
test('fallback - empty', () => {
assert.strictEqual(reactionService.normalize(''), '❤');
});
test('fallback - unknown', async () => {
assert.strictEqual(await reactionService.normalize('unknown'), '❤');
test('fallback - unknown', () => {
assert.strictEqual(reactionService.normalize('unknown'), '❤');
});
});