Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
penginn-net committed Jan 10, 2025
1 parent c04c222 commit 6036132
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/backend/test-federation/test/emoji.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,11 @@ describe('Emoji', () => {
assert(noteInB.emojis != null);
assert(emoji.name in noteInB.emojis);
strictEqual(noteInB.emojis[emoji.name], emoji.url);
const emojiId = (await bAdmin.client.request('admin/emoji/list-remote')).find( x => x.name === emoji.name).id;

// @ts-ignore

Check failure on line 199 in packages/backend/test-federation/test/emoji.test.ts

View workflow job for this annotation

GitHub Actions / lint (backend)

Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free
const emojiId = (await bAdmin.client.request('admin/emoji/list-remote')).find( x => x.name === emoji.name).id;

Check failure on line 200 in packages/backend/test-federation/test/emoji.test.ts

View workflow job for this annotation

GitHub Actions / lint (backend)

Multiple spaces found before '=>'
const res = await bAdmin.client.request('admin/emoji/copy',{ emojiId: emojiId });

Check failure on line 201 in packages/backend/test-federation/test/emoji.test.ts

View workflow job for this annotation

GitHub Actions / lint (backend)

A space is required after ','
console.log(res);
console.log(JSON.stringify(res));
});
test('コピー拒否の絵文字をコピーできない(steal)', async () => {
const emoji = await addCustomEmoji('a.test', {
Expand All @@ -221,7 +223,7 @@ describe('Emoji', () => {
assert(emoji.name in noteInB.emojis);
strictEqual(noteInB.emojis[emoji.name], emoji.url);
const res = await bAdmin.client.request('admin/emoji/steal',{ name: emoji.name, host: 'a.test' });

Check failure on line 225 in packages/backend/test-federation/test/emoji.test.ts

View workflow job for this annotation

GitHub Actions / lint (backend)

A space is required after ','
console.log(res);
console.log(JSON.stringify(res));
});

test('コピー許可の絵文字をコピーできる', async () => {
Expand All @@ -245,9 +247,10 @@ describe('Emoji', () => {
assert(noteInB.emojis != null);
assert(emoji.name in noteInB.emojis);
strictEqual(noteInB.emojis[emoji.name], emoji.url);
// @ts-ignore

Check failure on line 250 in packages/backend/test-federation/test/emoji.test.ts

View workflow job for this annotation

GitHub Actions / lint (backend)

Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free
const emojiId = (await bAdmin.client.request('admin/emoji/list-remote')).find( x => x.name === emoji.name).id;
const res = await bAdmin.client.request('admin/emoji/copy',{ emojiId: emojiId });

Check failure on line 252 in packages/backend/test-federation/test/emoji.test.ts

View workflow job for this annotation

GitHub Actions / lint (backend)

A space is required after ','
console.log(res);
console.log(JSON.stringify(res));
});
test('条件付きの絵文字をコピーできない', async () => {
const emoji = await addCustomEmoji('a.test', {
Expand All @@ -270,8 +273,9 @@ describe('Emoji', () => {
assert(noteInB.emojis != null);
assert(emoji.name in noteInB.emojis);
strictEqual(noteInB.emojis[emoji.name], emoji.url);
// @ts-ignore

Check failure on line 276 in packages/backend/test-federation/test/emoji.test.ts

View workflow job for this annotation

GitHub Actions / lint (backend)

Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free
const emojiId = (await bAdmin.client.request('admin/emoji/list-remote')).find( x => x.name === emoji.name).id;
const res = bAdmin.client.request('admin/emoji/copy',{ emojiId: emojiId });

Check failure on line 278 in packages/backend/test-federation/test/emoji.test.ts

View workflow job for this annotation

GitHub Actions / lint (backend)

A space is required after ','
console.log(res);
console.log(JSON.stringify(res));
});
});

0 comments on commit 6036132

Please sign in to comment.