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 94d436e commit 2e36980
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions packages/backend/test-federation/test/emoji.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,21 @@ describe('Emoji', () => {
assert(noteInB.emojis != null);
assert(emoji.name in noteInB.emojis);
strictEqual(noteInB.emojis[emoji.name], emoji.url);

// @ts-expect-error anyで警告が出るため
const emojiId = (await bAdmin.client.request('admin/emoji/list-remote')).find( x => x.name === emoji.name).id;
let res:string;
try {
res = await bAdmin.client.request('admin/emoji/copy', {emojiId: emojiId});
} catch (e) {
res = JSON.stringify(e);
}
console.log(JSON.stringify(res));
let res = await fetch(`https://b.test/api/admin/emoji/copy`, {

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

View workflow job for this annotation

GitHub Actions / lint (backend)

'res' is never reassigned. Use 'const' instead
method: 'POST',
body: JSON.stringify({
emojiId: emojiId,
i: bAdmin.client.credential,
}),
headers: {
'Content-Type': 'application/json',
},
credentials: 'omit',
cache: 'no-cache',
});
console.log(await res.json());

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

View workflow job for this annotation

GitHub Actions / lint (backend)

Multiple spaces found before 'res'
});
});

0 comments on commit 2e36980

Please sign in to comment.