テストの追加と検出した不備の修正
This commit is contained in:
parent
f7f9df878b
commit
28fdf1b9a6
15 changed files with 1974 additions and 203 deletions
|
|
@ -69,6 +69,9 @@ describe('アンテナ', () => {
|
|||
let userMutingAlice: User;
|
||||
let userMutedByAlice: User;
|
||||
|
||||
let testChannel: misskey.entities.Channel;
|
||||
let testMutedChannel: misskey.entities.Channel;
|
||||
|
||||
beforeAll(async () => {
|
||||
root = await signup({ username: 'root' });
|
||||
alice = await signup({ username: 'alice' });
|
||||
|
|
@ -120,6 +123,10 @@ describe('アンテナ', () => {
|
|||
userMutedByAlice = await signup({ username: 'userMutedByAlice' });
|
||||
await post(userMutedByAlice, { text: 'test' });
|
||||
await api('mute/create', { userId: userMutedByAlice.id }, alice);
|
||||
|
||||
testChannel = (await api('channels/create', { name: 'test' }, root)).body;
|
||||
testMutedChannel = (await api('channels/create', { name: 'test-muted' }, root)).body;
|
||||
await api('channels/mute/create', { channelId: testMutedChannel.id }, alice);
|
||||
}, 1000 * 60 * 10);
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
@ -570,6 +577,20 @@ describe('アンテナ', () => {
|
|||
{ note: (): Promise<Note> => post(bob, { text: `${keyword}` }), included: true },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'チャンネルノートも含む',
|
||||
parameters: () => ({ src: 'all' }),
|
||||
posts: [
|
||||
{ note: (): Promise<Note> => post(bob, { text: `test ${keyword}`, channelId: testChannel.id }), included: true },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'ミュートしてるチャンネルは含まない',
|
||||
parameters: () => ({ src: 'all' }),
|
||||
posts: [
|
||||
{ note: (): Promise<Note> => post(bob, { text: `test ${keyword}`, channelId: testMutedChannel.id }) },
|
||||
],
|
||||
},
|
||||
])('が取得できること($label)', async ({ parameters, posts }) => {
|
||||
const antenna = await successfulApiCall({
|
||||
endpoint: 'antennas/create',
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue