refactor: use test
This commit is contained in:
@@ -23,7 +23,7 @@ describe('Mute', () => {
|
||||
await shutdownServer(p);
|
||||
});
|
||||
|
||||
it('ミュート作成', async () => {
|
||||
test('ミュート作成', async () => {
|
||||
const res = await request('/mute/create', {
|
||||
userId: carol.id,
|
||||
}, alice);
|
||||
@@ -31,7 +31,7 @@ describe('Mute', () => {
|
||||
assert.strictEqual(res.status, 204);
|
||||
});
|
||||
|
||||
it('「自分宛ての投稿」にミュートしているユーザーの投稿が含まれない', async () => {
|
||||
test('「自分宛ての投稿」にミュートしているユーザーの投稿が含まれない', async () => {
|
||||
const bobNote = await post(bob, { text: '@alice hi' });
|
||||
const carolNote = await post(carol, { text: '@alice hi' });
|
||||
|
||||
@@ -43,7 +43,7 @@ describe('Mute', () => {
|
||||
assert.strictEqual(res.body.some((note: any) => note.id === carolNote.id), false);
|
||||
});
|
||||
|
||||
it('ミュートしているユーザーからメンションされても、hasUnreadMentions が true にならない', async () => {
|
||||
test('ミュートしているユーザーからメンションされても、hasUnreadMentions が true にならない', async () => {
|
||||
// 状態リセット
|
||||
await request('/i/read-all-unread-notes', {}, alice);
|
||||
|
||||
@@ -55,7 +55,7 @@ describe('Mute', () => {
|
||||
assert.strictEqual(res.body.hasUnreadMentions, false);
|
||||
});
|
||||
|
||||
it('ミュートしているユーザーからメンションされても、ストリームに unreadMention イベントが流れてこない', async () => {
|
||||
test('ミュートしているユーザーからメンションされても、ストリームに unreadMention イベントが流れてこない', async () => {
|
||||
// 状態リセット
|
||||
await request('/i/read-all-unread-notes', {}, alice);
|
||||
|
||||
@@ -64,7 +64,7 @@ describe('Mute', () => {
|
||||
assert.strictEqual(fired, false);
|
||||
});
|
||||
|
||||
it('ミュートしているユーザーからメンションされても、ストリームに unreadNotification イベントが流れてこない', async () => {
|
||||
test('ミュートしているユーザーからメンションされても、ストリームに unreadNotification イベントが流れてこない', async () => {
|
||||
// 状態リセット
|
||||
await request('/i/read-all-unread-notes', {}, alice);
|
||||
await request('/notifications/mark-all-as-read', {}, alice);
|
||||
@@ -75,7 +75,7 @@ describe('Mute', () => {
|
||||
});
|
||||
|
||||
describe('Timeline', () => {
|
||||
it('タイムラインにミュートしているユーザーの投稿が含まれない', async () => {
|
||||
test('タイムラインにミュートしているユーザーの投稿が含まれない', async () => {
|
||||
const aliceNote = await post(alice);
|
||||
const bobNote = await post(bob);
|
||||
const carolNote = await post(carol);
|
||||
@@ -89,7 +89,7 @@ describe('Mute', () => {
|
||||
assert.strictEqual(res.body.some((note: any) => note.id === carolNote.id), false);
|
||||
});
|
||||
|
||||
it('タイムラインにミュートしているユーザーの投稿のRenoteが含まれない', async () => {
|
||||
test('タイムラインにミュートしているユーザーの投稿のRenoteが含まれない', async () => {
|
||||
const aliceNote = await post(alice);
|
||||
const carolNote = await post(carol);
|
||||
const bobNote = await post(bob, {
|
||||
@@ -107,7 +107,7 @@ describe('Mute', () => {
|
||||
});
|
||||
|
||||
describe('Notification', () => {
|
||||
it('通知にミュートしているユーザーの通知が含まれない(リアクション)', async () => {
|
||||
test('通知にミュートしているユーザーの通知が含まれない(リアクション)', async () => {
|
||||
const aliceNote = await post(alice);
|
||||
await react(bob, aliceNote, 'like');
|
||||
await react(carol, aliceNote, 'like');
|
||||
|
Reference in New Issue
Block a user