summaryrefslogtreecommitdiff
path: root/packages/backend/test/e2e/thread-mute.ts
diff options
context:
space:
mode:
authorzyoshoka <107108195+zyoshoka@users.noreply.github.com>2024-03-03 20:15:35 +0900
committerGitHub <noreply@github.com>2024-03-03 20:15:35 +0900
commit38837bd388621f5ba49bd7bf0f657a08ec2f19c4 (patch)
treedf9ffff0242ff32e4310682f8769f7476732db11 /packages/backend/test/e2e/thread-mute.ts
parentUpdate README.md (diff)
downloadsharkey-38837bd388621f5ba49bd7bf0f657a08ec2f19c4.tar.gz
sharkey-38837bd388621f5ba49bd7bf0f657a08ec2f19c4.tar.bz2
sharkey-38837bd388621f5ba49bd7bf0f657a08ec2f19c4.zip
test(backend): refactor tests (#13499)
* test(backend): refactor tests * fix: failed test
Diffstat (limited to 'packages/backend/test/e2e/thread-mute.ts')
-rw-r--r--packages/backend/test/e2e/thread-mute.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/packages/backend/test/e2e/thread-mute.ts b/packages/backend/test/e2e/thread-mute.ts
index b4570cdef1..53bb6eb765 100644
--- a/packages/backend/test/e2e/thread-mute.ts
+++ b/packages/backend/test/e2e/thread-mute.ts
@@ -24,12 +24,12 @@ describe('Note thread mute', () => {
const bobNote = await post(bob, { text: '@alice @carol root note' });
const aliceReply = await post(alice, { replyId: bobNote.id, text: '@bob @carol child note' });
- await api('/notes/thread-muting/create', { noteId: bobNote.id }, alice);
+ await api('notes/thread-muting/create', { noteId: bobNote.id }, alice);
const carolReply = await post(carol, { replyId: bobNote.id, text: '@bob @alice child note' });
const carolReplyWithoutMention = await post(carol, { replyId: aliceReply.id, text: 'child note' });
- const res = await api('/notes/mentions', {}, alice);
+ const res = await api('notes/mentions', {}, alice);
assert.strictEqual(res.status, 200);
assert.strictEqual(Array.isArray(res.body), true);
@@ -40,15 +40,15 @@ describe('Note thread mute', () => {
test('ミュートしているスレッドからメンションされても、hasUnreadMentions が true にならない', async () => {
// 状態リセット
- await api('/i/read-all-unread-notes', {}, alice);
+ await api('i/read-all-unread-notes', {}, alice);
const bobNote = await post(bob, { text: '@alice @carol root note' });
- await api('/notes/thread-muting/create', { noteId: bobNote.id }, alice);
+ await api('notes/thread-muting/create', { noteId: bobNote.id }, alice);
const carolReply = await post(carol, { replyId: bobNote.id, text: '@bob @alice child note' });
- const res = await api('/i', {}, alice);
+ const res = await api('i', {}, alice);
assert.strictEqual(res.status, 200);
assert.strictEqual(res.body.hasUnreadMentions, false);
@@ -56,11 +56,11 @@ describe('Note thread mute', () => {
test('ミュートしているスレッドからメンションされても、ストリームに unreadMention イベントが流れてこない', () => new Promise<void>(async done => {
// 状態リセット
- await api('/i/read-all-unread-notes', {}, alice);
+ await api('i/read-all-unread-notes', {}, alice);
const bobNote = await post(bob, { text: '@alice @carol root note' });
- await api('/notes/thread-muting/create', { noteId: bobNote.id }, alice);
+ await api('notes/thread-muting/create', { noteId: bobNote.id }, alice);
let fired = false;
@@ -84,12 +84,12 @@ describe('Note thread mute', () => {
const bobNote = await post(bob, { text: '@alice @carol root note' });
const aliceReply = await post(alice, { replyId: bobNote.id, text: '@bob @carol child note' });
- await api('/notes/thread-muting/create', { noteId: bobNote.id }, alice);
+ await api('notes/thread-muting/create', { noteId: bobNote.id }, alice);
const carolReply = await post(carol, { replyId: bobNote.id, text: '@bob @alice child note' });
const carolReplyWithoutMention = await post(carol, { replyId: aliceReply.id, text: 'child note' });
- const res = await api('/i/notifications', {}, alice);
+ const res = await api('i/notifications', {}, alice);
assert.strictEqual(res.status, 200);
assert.strictEqual(Array.isArray(res.body), true);